Version 7.6
We have some background polling threads (actually still using refresher add-on due to familiarity) that call long-running db processes. The UI class implements ErrorHandler and I have attached it to the current session on the first line of the init method. The problem I see is that any issues with stored procedures that get called or executed could cause errors (especially during development and testing). These errors are thrown and logged in the portal logs (this is a vaadin portlet), but these never get caught by the UI ErrorHandler. Errors at the UI level get caught as expected. So at the front end, the user experiences the running spinner with no knowledge that the thread threw an exception and the UI will never get updated.
How can I gracefully handle errors generated from spereate threads? I have tried setting the errorhandler to the parent UI class in the constructor of the threads and I have also tried to implement errorhandler in my thread classes and in the error() method, call the parent UI error method. None seem to work and I am unable to handle exceptions that occur in any of the thread classes. Naturally, I can always try…catch everything in the threads and handle it that way, but I feel like I am missing something. Any insight would be appreciated.
Thanks,
Scott