Hi there,
I am still using Vaadin 6.8.8 and I have trouble getting error-handling as described in the book of vaadin to work.
As stated
here
I am implementing the terminalError-Method in my Application-class like this:
@Override
public void terminalError(com.vaadin.terminal.Terminal.ErrorEvent event) {
super.terminalError(event);
Throwable e = event.getThrowable();
log.error("Exception of type " + e.getClass() + " : " + e.getMessage());
e.printStackTrace();
ViewHandler.activateView(ErrorView.class, e, currentClient);
};
I am using the AppFoundation-Addon (ViewHandler) v1.3.5.
My intention is to catch any unchecked Exception (e.g. a NullPointerException) and redirect to my ErrorView.
For testing purposes I programmatically built in a NullpointerException in one of my views.
Though I implemented the above stated method, the application ends up in a tomcat-error page HTTP Status 500.
As my log-message ist not appearing in my logfile so I assume, that my mehtod is not being called.
I also tried to setErrorHandler() with the same implementation of the ErrorListener-Method. No success.
What am I doing wrong here?