This is a duplicate question / thread, however the previous posts are now dated. I am wondering have there been any developments pertaining to best practices for this.
What is the best way to define / set a handler for uncaught exceptions:
At main UI?:
UI.getCurrent().setErrorHandler(new CustomErrorHandler());
Or on session level?:
VaadinSession.getCurrent().setErrorHandler(new CustomErrorHandler());
What are the benefits of each? Should one register a handler with both the Session & UI in an init() method?
Related posts include:
https://vaadin.com/docs/-/part/framework/application/application-errors.html
https://vaadin.com/forum/#!/thread/1383731/1383730
http://stackoverflow.com/questions/20615816/central-error-handling-in-vaadin
Thanks so much taking the time to read this and help.