Package com.gmt2001
Class UncaughtExceptionHandler
java.lang.Object
com.gmt2001.UncaughtExceptionHandler
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
public final class UncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler
Catches exceptions which have not been caught elsewhere
- Author:
- gmt2001
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UncaughtExceptionHandler
instance()
Instancevoid
uncaughtException
(Thread t, Throwable e) Handles uncaught exceptions
-
Constructor Details
-
UncaughtExceptionHandler
public UncaughtExceptionHandler()
-
-
Method Details
-
instance
Instance- Returns:
- an instance
-
uncaughtException
Handles uncaught exceptionsIn addition to sending to the regular error handler (Console,
core-error
log, Rollbar), the exception is logged in thestacktraces
folderIf the exception is an
OutOfMemoryError
, then a heap dump is additionally created- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
- Parameters:
t
- the thread on which the exception was throwne
- the exception that was thrown
-