Handling Internal Error - Vaadin 7.7

I’m facing the following problem : sometime errors in code produces an Internal Error.
The Internal Error is shown in upper screeen position within a black band, then the application stops.
I need to avoid this problem, show a custom message, and leave the application running.
I tried to use the ErrorHandler in the Application modifying the notifyException method of the Application class in order to change the behaviour but nothing changed.
Is there any way to solve the issue ?
How can I avoid this ?
Tks
Tullio

I tried using the WindowErrorHandler addon but it didn’t work.
Nobody can help ?
Tks