Bug 188369 - Extension registry don't catch exceptions thrown by listeners
Summary: Extension registry don't catch exceptions thrown by listeners
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-05-22 12:24 EDT by Danail Nachev CLA
Modified: 2007-05-22 17:29 EDT (History)
0 users

See Also:
pascal: review+
dj.houghton: review+


Attachments
proposal fix (2.18 KB, patch)
2007-05-22 12:51 EDT, Danail Nachev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Danail Nachev CLA 2007-05-22 12:24:40 EDT
Currently, when the registry is notifying the IRegistryChangeListener, it does not wrap the call in try-catch block (or in ISafeRunnable). This leads to the problem if one registry listener throws an exception, the registry stops notifying the listeners. If the bad listener is first in the row, nobody will be notified.
Comment 1 Danail Nachev CLA 2007-05-22 12:51:37 EDT
Created attachment 68165 [details]
proposal fix

Here is a proposal fix for the bug. It is rather straight forward. I used SafeRunner because it directly logs to the log if available. Additionally the exception is added to the result status returned by processChangeEvent() so anyone interested in it could check it out (currently no one:)
Comment 2 Oleg Besedin CLA 2007-05-22 15:36:57 EDT
+1 to the patch. Adding Pascal to review.

Thank you!

Comment 3 Pascal Rapicault CLA 2007-05-22 16:28:16 EDT
Patch is good to go.
While releasing, make sure you update the copyrights appropriately.
Comment 4 Jeff McAffer CLA 2007-05-22 16:44:32 EDT
err, you need another review
Comment 5 Oleg Besedin CLA 2007-05-22 17:29:18 EDT
The contributed patch is released into CVS head; copyright is updated - thanks Pascal for reminder!