| Summary: | Avoid "t.printStackTrace();" in Worker.java when logging unhandled errors | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Luc Bourlier <eclipse> |
| Component: | Runtime | Assignee: | Szymon Ptaszkiewicz <sptaszkiewicz> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sptaszkiewicz |
| Version: | 3.0 | ||
| Target Milestone: | 4.5 M3 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Luc Bourlier
True. Essentially, this catch block should never be hit. There is a finally block inside of the outer try/catch, and it logs any exceptions in the .log. The outer finally is just there in case of drastic failure - for example failure while writing the log file. Since the worker thread is about to die in this case, we don't want the error to be lost. I would be surprised if this catch block ever gets hit, but it's there just in case... (In reply to John Arthorne from comment #1) > True. Essentially, this catch block should never be hit. There is a > finally block inside of the outer try/catch, and it logs any exceptions in the > .log. > > The outer finally is just there in case of drastic failure - for example > failure while writing the log file. Since the worker thread is about to die in > this case, we don't want the error to be lost. I would be surprised if this > catch block ever gets hit, but it's there just in case... Unfortunately, this catch block was hit quite a few times. See bug 392794 where tracking the cause of a deadlock was severely limited because of lack of proper information about those drastic errors in the log. Reopening to replace "t.printStackTrace();" with something that will be written to the log file. Fixed in master: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=26020fb16a289b52edabca05db34f809ac1c7435 Verified in I20140930-0800. |