Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: If UIProcess.runJob throws an exception, it is almost ignored in UIProcess.InternalJob:179. It should be logged at least. I think an exception should not be even catched at this point, because this deactivates the default exception handling of the Eclipse Job Worker. Reproducible: Always
Thanks Ralf. From my POV we should at least log it - not ignore it.
Created attachment 150490 [details] Patch to enable default exception handling by Worker Exceptions in runJob() are no longer caught in UIProcess.InternalJob.run() to enable default exception handling by Worker.
Created attachment 150491 [details] mylyn/context/zip
Hi Artur, thanks for the patch. :-) I agree with all changes, except for one thing: If I am not mistaken, runJob(monitor) is code that is typically overriden by the subclass (written by the app developer). So we cannot really know what could possibly go wrong there. In a case where runJob(...) throws an exception - what do we do? The run method is not going to return normally. So from my point of view we still need a catch clause, just to be on the defensive side of things: try { success = runJob(monitor); // Exception handling is done by Worker } catch(Throwable t) { // log it status = false; } Let me know what you think... Thanks and kind regards, Elias.
Since UIProcess does not know how to handle exceptions from runJob(), in my opinion, it is reasonable to not handle the exception there (as Ralf suggested). The exception will propagate to Worker.run() where it will be handled/logged and the special case of OperationCanceledException will be taken care of. Otherwise, we would have to do the logging (and handling of OperationCanceledException) ourselves.
The idea ist that UIProcess runJob method if finished with an exception must call the ExceptionHandler in Riena. There the application can handle the exception gracefully like log it, show a message box etc.... I believe thats what we should do to fix this bug.
Created attachment 151553 [details] Patch to forward exceptions to the exception handler manager All exceptions from runJob (except for OperationCanceledException) will be handled by the exception handler manager
patch committed. Bug fixed. thanks Artur