Handling Exception [message #452840] |
Mon, 17 July 2006 23:14 |
Eclipse User |
|
|
|
Originally posted by: vinicius.ferraz.gmail.com
Hi, I would like to know if is possible to show a Dialog containing any
Exception that was thrown in my application... and how
I tried as follow:
in my "WorkbenchAdvisor" class i override the method
eventLoopException(java.lang.Throwable).
public void eventLoopException(Throwable exception) {
SimulacaoGUIPlugin.getDefault().handlePlugin( new SudokuException(
exception.getMessage(), exception));
super.eventLoopException(exception);
}
SimulacaoGUIPlugin, calls the handlePlugin in the activated PartView.
But When exceptions were throw in some PartViews, the method
eventLoopException(java.lang.Throwable) don't was called.
In other Words, When any exception was throw (anywhere) I wanna open a
Dialog with the stackTrace....
|
|
|
Re: Handling Exception [message #453633 is a reply to message #452840] |
Fri, 04 August 2006 14:20 |
Paul E. Keyser Messages: 878 Registered: July 2009 |
Senior Member |
|
|
Well, I don't think you can "plug in" an exception-handler like that without having defined the
"extension-point", as it were. That is, at each point in the code where there could be an exception,
you need to define some handler-mechanism; if you want all of them to be the same handler, just call
that one. (Anyway, that sort of thing is what I have done, and it works; a bit tedious to retro-fit,
but no big deal if done as you go.
HTH,
Paul
|
|
|
Powered by
FUDForum. Page generated in 0.04331 seconds