KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > rcp > exceptionhandler > dialog > ThrowableHandler


1 /*
2  * Created on Sep 23, 2004
3  *
4  */

5 package com.nightlabs.rcp.exceptionhandler.dialog;
6
7 import org.apache.log4j.Logger;
8 import org.eclipse.ui.PlatformUI;
9
10 import com.nightlabs.rcp.exceptionhandler.IExceptionHandler;
11
12 /**
13  * @author Alexander Bieber <alex[AT]nightlabs[DOT]de>
14  */

15 public class ThrowableHandler implements IExceptionHandler {
16     public static final Logger LOGGER = Logger.getLogger(ThrowableHandler.class);
17
18     /* (non-Javadoc)
19      * @see com.nightlabs.rcp.exceptionhandler.IExceptionHandler#handleException(java.lang.Throwable)
20      */

21     public void handleException(Thread JavaDoc thread, Throwable JavaDoc exception, Throwable JavaDoc triggerException) {
22         // dont care for the thread by now
23
LOGGER.error("handleException("+thread+")", exception);
24       // System.out.println("ThrowableHandler.handleException("+exception.toString()+")");
25
ThrowableHandlerDialog dialog = new ThrowableHandlerDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),exception);
26       dialog.open();
27 // System.out.println("Exception class is: "+exception.getClass().getName());
28
// exception.printStackTrace();
29
}
30
31 }
32
Popular Tags