Class LoggingUncaughtExceptionHandler

  • All Implemented Interfaces:
    java.lang.Thread.UncaughtExceptionHandler

    public final class LoggingUncaughtExceptionHandler
    extends java.lang.Object
    implements java.lang.Thread.UncaughtExceptionHandler
    Logging uncaught exception handler.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void uncaughtException​(java.lang.Thread t, java.lang.Throwable e)
      Method invoked when the given thread terminates due to the given uncaught exception.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoggingUncaughtExceptionHandler

        public LoggingUncaughtExceptionHandler​(Logger log)
        Create a new instance.
        Parameters:
        log - the logger to log the uncaught exception to
    • Method Detail

      • uncaughtException

        public void uncaughtException​(java.lang.Thread t,
                                      java.lang.Throwable e)
        Method invoked when the given thread terminates due to the given uncaught exception.

        Any exception thrown by this method will be ignored by the Java Virtual Machine.

        Specified by:
        uncaughtException in interface java.lang.Thread.UncaughtExceptionHandler
        Parameters:
        t - the thread
        e - the exception