org.opensolaris.os.dtrace
Interface ExceptionHandler
public interface ExceptionHandler
User-defined application behavior after an exception terminates
a running DTrace consumer. The 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
.
- See Also:
Consumer.go(ExceptionHandler handler)
Method Summary |
void |
handleException(java.lang.Throwable e)
Defines what to do after an exception terminates a running Consumer . |
handleException
void handleException(java.lang.Throwable e)
- Defines what to do after an exception terminates a running
Consumer
. For example, a handler might be implemented to
display details about what went wrong.
- Parameters:
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.