public abstract class ExceptionMonitor
extends java.lang.Object
exceptionCaught(Throwable) is
invoked when there are any uncaught exceptions.
You can monitor any uncaught exceptions by setting ExceptionMonitor
by calling setInstance(ExceptionMonitor). The default
monitor logs all caught exceptions in WARN level using
SLF4J.
| 构造器和说明 |
|---|
ExceptionMonitor() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract void |
exceptionCaught(java.lang.Throwable cause)
Invoked when there are any uncaught exceptions.
|
static ExceptionMonitor |
getInstance() |
static void |
setInstance(ExceptionMonitor monitor)
Sets the uncaught exception monitor.
|
public static ExceptionMonitor getInstance()
public static void setInstance(ExceptionMonitor monitor)
null is specified,
the default monitor will be set.monitor - A new instance of DefaultExceptionMonitor is set
if null is specified.public abstract void exceptionCaught(java.lang.Throwable cause)
cause - The caught exception