org.af.commons.errorhandling
Class DefaultExceptionHandler

java.lang.Object
  extended by org.af.commons.errorhandling.DefaultExceptionHandler
All Implemented Interfaces:
Thread.UncaughtExceptionHandler

public class DefaultExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler

This class handles all throwables / exceptions in a consistent manner. The handler has to be installed on every thread running in the program.

At the moment all exceptions, their traces and causes are plotted in the main log file. If GUI is present the user is informed about the error by a pop-up window.


Constructor Summary
DefaultExceptionHandler()
          Constructor
 
Method Summary
 void handle(Throwable e)
          Called by EventDispatchingThread if "sun.awt.exception.handler" is set to this class name and an exception occurs.
 void uncaughtException(Thread t, Throwable e)
          Inherited method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExceptionHandler

public DefaultExceptionHandler()
Constructor

Method Detail

uncaughtException

public void uncaughtException(Thread t,
                              Throwable e)
Inherited method. Called when an uncaught exception is passed to the handler.

Specified by:
uncaughtException in interface Thread.UncaughtExceptionHandler
Parameters:
t - Thread were the exception occurred
e - Exception

handle

public void handle(Throwable e)
Called by EventDispatchingThread if "sun.awt.exception.handler" is set to this class name and an exception occurs.

Parameters:
e - Exception