The Vaadin web framework displays a red error alert for any uncaught exceptions:
Internal error
Please notify the administrator
…
The Vaadin documentation describes how to set a custom error handler.
When I provide a custom error handler, the default red error alert still shows up. When the user dismisses that error alert, then the custom error alert appears. I would like to only show the custom error alert. How can one disable the default "Internal error" alert?
Below is the overridden terminalError method of my vaadin Application class:
@Override public void terminalError(Terminal.ErrorEvent event) {
// Call the default implementation.
super.terminalError(event);
// Some custom behaviour.
if (getMainWindow() != null) {
getMainWindow().showNotification(
"An unchecked exception occured!",
event.getThrowable().toString(),
Notification.TYPE_ERROR_MESSAGE);
} }
Do both actions happens because you call
super.terminalError(event)?Or do you have to clear the component error that is set in this method?