Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Centralized Exception handling for Eclipse plug-in
icon5.gif  Centralized Exception handling for Eclipse plug-in [message #500221] Wed, 25 November 2009 12:41 Go to next message
Svilen Genchev is currently offline Svilen GenchevFriend
Messages: 8
Registered: November 2009
Junior Member

Hello,

At first I thought this would be question often asked, however trying (and failing) to look up info on this proved me wrong.

Is there a mechanism in Eclipse platform for centralized exception handling of exceptions?

For example... You have plug-in project which connects to a DB and issues queries, results of which are used to populate some e.g. views. This is like the most common example ever. Smile Queries are executed almost for any user action, from every UI control the plug-in provides. Most likely the DB Query API will have some specific to the DB SomeDBGeneralException declared as being thrown by it. That's OK, you can handle those according to whatever your software design is. But how about unchecked exceptions which are likely to occur, e.g. , when communication with DB suddenly breaks for some network related reason? What if in such case one would like to catch those exceptions in a central place and for example provide user friendly message to the user (rather than the low level communication protocol api messages) and even some possible actions the user could execute in order to deal with the specific problem?

Thinking in Eclipse platform context, the question may be rephrased as "Is there an extension point like "org.eclipse.ExceptionHandler" which allows to declare exception handlers for specific (some kind of filtering support) exceptions giving a lot of flexibility with the actual handling?"
Re: Centralized Exception handling for Eclipse plug-in [message #505522 is a reply to message #500221] Thu, 31 December 2009 17:41 Go to previous message
Benjamin Leipold is currently offline Benjamin LeipoldFriend
Messages: 13
Registered: July 2009
Junior Member
I had a similar problem some time ago with centralized handling of job status. I registered my own status handler via org.eclipse.ui.statusHandlers extension point ( http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/ua_statushandling_defining.htm). Maybe you can convert your exceptions to IStatus object and let your own status handler process those status.
Previous Topic:[CommonNavigator]override RefreshAction
Next Topic:Customized .log file location
Goto Forum:
  


Current Time: Thu Apr 25 04:37:09 GMT 2024

Powered by FUDForum. Page generated in 0.02500 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top