public class SentryUncaughtExceptionHandler extends Object implements Thread.UncaughtExceptionHandler
Constructor and Description |
---|
SentryUncaughtExceptionHandler(Thread.UncaughtExceptionHandler defaultExceptionHandler)
Construct the
SentryUncaughtExceptionHandler , storing the pre-existing uncaught exception
handler. |
Modifier and Type | Method and Description |
---|---|
void |
disable()
Disable this instance and attempt to remove it as the default
Thread.UncaughtExceptionHandler . |
Boolean |
isEnabled() |
static SentryUncaughtExceptionHandler |
setup()
Configures an uncaught exception handler which sends events to
Sentry, then calls the preexisting uncaught exception handler.
|
void |
uncaughtException(Thread thread,
Throwable thrown)
Sends any uncaught exception to Sentry, then passes the exception on to the pre-existing
uncaught exception handler.
|
public SentryUncaughtExceptionHandler(Thread.UncaughtExceptionHandler defaultExceptionHandler)
SentryUncaughtExceptionHandler
, storing the pre-existing uncaught exception
handler.defaultExceptionHandler
- pre-existing uncaught exception handlerpublic void uncaughtException(Thread thread, Throwable thrown)
uncaughtException
in interface Thread.UncaughtExceptionHandler
thread
- thread that threw the errorthrown
- the uncaught throwablepublic static SentryUncaughtExceptionHandler setup()
SentryUncaughtExceptionHandler
that was setup.public void disable()
Thread.UncaughtExceptionHandler
.public Boolean isEnabled()
Copyright © 2012–2018. All rights reserved.