1 4 package com.nightlabs.rcp.exceptionhandler.wizard; 5 6 import org.apache.log4j.Logger; 7 8 import com.nightlabs.rcp.exceptionhandler.IExceptionHandler; 9 import com.nightlabs.rcp.wizard.DynamicPathWizardDialog; 10 11 14 public class ThrowableHandler implements IExceptionHandler 15 { 16 public static final Logger LOGGER = Logger.getLogger(ThrowableHandler.class); 17 20 public void handleException(Thread thread, Throwable thrownException, 21 Throwable triggerException) 22 { 23 try { 24 LOGGER.error("ThrowableHandler handling an error!", thrownException); 25 26 ErrorReport errorReport = new ErrorReport(thrownException, triggerException); 27 ExceptionHandlerWizard wizard = new ExceptionHandlerWizard(errorReport); 29 DynamicPathWizardDialog dialog = new DynamicPathWizardDialog(wizard); 30 dialog.setTitle("An error occured!"); 31 dialog.open(); 32 } catch (Throwable hanspeter) { 33 LOGGER.fatal("While handling an exception, another one occured!", hanspeter); 34 } 35 } 36 37 } 42 | Popular Tags |