public interface ExceptionHandler
Consumer
that threw the
exception is stopped automatically whether or not an ExceptionHandler
is set, but a handler must be set to do anything
other than print a stack trace to stderr
.Consumer.go(ExceptionHandler handler)
Modifier and Type | Method and Description |
---|---|
void |
handleException(java.lang.Throwable e)
Defines what to do after an exception terminates a running
Consumer . |
void handleException(java.lang.Throwable e)
Consumer
. For example, a handler might be implemented to
display details about what went wrong.e
- a DTraceException
if encountered in the native
DTrace library, a ConsumerException
if thrown from a
ConsumerListener
method to terminate the consumer, or a
RuntimeException
to indicate an unexpected error in the
Java DTrace API.