KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > rcp > exceptionhandler > ExceptionHandlingWorkbenchAdvisor


1 /*
2  * Created on Sep 24, 2004
3  */

4 package com.nightlabs.rcp.exceptionhandler;
5
6 import org.eclipse.ui.application.WorkbenchAdvisor;
7
8
9 /**
10  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
11  */

12 public abstract class ExceptionHandlingWorkbenchAdvisor extends WorkbenchAdvisor {
13             
14     private ExceptionHandlerEPProcessor epProcessor = null;
15     /**
16      * Checks the {@link ExceptionHandlerRegistry} for registered {@link ExceptionHandlerRegistryItem} by invoking
17      * {@link #ExceptionHandlerRegistry.searchHandler(Throwable)}. For the found item the {@link IExceptionHandler.handleException(Throwable)}
18      * method is invoked on a unique instance of the eventHandler class (plugin.xml).
19      */

20     public void eventLoopException(Throwable JavaDoc exception) {
21         if (!ExceptionHandlerRegistry.syncHandleException(exception))
22             super.eventLoopException(exception);
23 // // find the proper handler
24
// ExceptionHandlerRegistry.ExceptionHandlerSearchResult handlerSearch = ExceptionHandlerRegistry.searchHandler(exception);
25
// Throwable handlingException = null;
26
// if (handlerSearch.getHandler() != null){
27
// try {
28
// handlerSearch.getHandler().handleException(Thread.currentThread(),exception,handlerSearch.getTriggerException());
29
// } catch (Throwable e) {
30
// handlingException = e;
31
// handlingException.initCause(exception);
32
// }
33
// if (handlingException != null)
34
// super.eventLoopException(handlingException);
35
// }
36
// else
37
// super.eventLoopException(exception);
38
}
39 }
40
Popular Tags