Package marauroa.common
Class MarauroaUncaughtExceptionHandler
java.lang.Object
marauroa.common.MarauroaUncaughtExceptionHandler
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
public class MarauroaUncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler
logs uncaught exceptions to the logging system before
the exception is propagated to the Java VM which will
kill the thread. The Java VM only logs to stderr so
there would be no information in the logfile without
this class.
-
Constructor Summary
ConstructorDescriptionMarauroaUncaughtExceptionHandler(boolean killOnError)
creates a new MarauroaUncaughtExceptionHandler -
Method Summary
Modifier and TypeMethodDescriptionstatic void
setup(boolean killOnError)
installs this uncaught exception handlervoid
uncaughtException(Thread thread, Throwable exception)
-
Constructor Details
-
MarauroaUncaughtExceptionHandler
public MarauroaUncaughtExceptionHandler(boolean killOnError)creates a new MarauroaUncaughtExceptionHandler- Parameters:
killOnError
- should the VM be killed?
-
-
Method Details
-
uncaughtException
- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
setup
public static void setup(boolean killOnError)installs this uncaught exception handler- Parameters:
killOnError
- should the VM be killed?
-