Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313885

Summary: [concurrency] TracingWrapperRunnable should log all Throwables not only RuntimeExceptions
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debug-dsfAssignee: Pawel Piech <pawel.1.piech>
Status: RESOLVED FIXED QA Contact: Pawel Piech <pawel.1.piech>
Severity: normal    
Priority: P3 CC: pawel.1.piech
Version: 7.0Flags: aleherb+eclipse: review+
Target Milestone: 7.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Add catch for Error exceptions. cdtdoug: iplog-

Description Anton Leherbauer CLA 2010-05-21 04:52:39 EDT
Exceptions thrown by a runnable executed in the DefaultDsfExecutor are logged when either assertions or the debug option "org.eclipse.cdt.dsf/debug/executor" are enabled.  Unfortunately this logging is restricted to RuntimeExceptions.  All other Exceptions or Errors are swallowed.  I just had a hard time tracking down an issue where a NoSuchMethodError screwed things up badly.  Without attaching a debugger this issue is almost impossible to diagnose.

I suggest to log all uncaught Throwables.
Comment 1 Pawel Piech CLA 2010-05-21 14:08:53 EDT
Created attachment 169533 [details]
Add catch for Error exceptions.

Theoretically checked exceptions should not even make it to the tracing wrapper.  But Error exceptions are not checked exception so we should definitely catch them too.  Are there any other unchecked exceptions that we need to worry about?
Comment 2 Pawel Piech CLA 2010-05-21 14:09:47 EDT
I committed the fix.  Toni, please review, and reopen if you think it's not sufficient.
Comment 3 Anton Leherbauer CLA 2010-05-27 06:46:27 EDT
+1 That should do it.
Comment 4 CDT Genie CLA 2010-07-28 15:29:22 EDT
*** cdt cvs genie on behalf of ppiech ***
Bug 313885 -  [concurrency] TracingWrapperRunnable should log all Throwables not only RuntimeExceptions

[*] DefaultDsfExecutor.java 1.10 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java?root=Tools_Project&r1=1.9&r2=1.10