Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313885 - [concurrency] TracingWrapperRunnable should log all Throwables not only RuntimeExceptions
Summary: [concurrency] TracingWrapperRunnable should log all Throwables not only Runti...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Pawel Piech CLA
QA Contact: Pawel Piech CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-21 04:52 EDT by Anton Leherbauer CLA
Modified: 2010-07-28 15:29 EDT (History)
1 user (show)

See Also:
aleherb+eclipse: review+


Attachments
Add catch for Error exceptions. (806 bytes, patch)
2010-05-21 14:08 EDT, Pawel Piech CLA
cdtdoug: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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