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 Details

    • MarauroaUncaughtExceptionHandler

      public MarauroaUncaughtExceptionHandler(boolean killOnError)
      creates a new MarauroaUncaughtExceptionHandler
      Parameters:
      killOnError - should the VM be killed?
  • Method Details

    • uncaughtException

      public void uncaughtException(Thread thread, Throwable exception)
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler
    • setup

      public static void setup(boolean killOnError)
      installs this uncaught exception handler
      Parameters:
      killOnError - should the VM be killed?