edu.emory.mathcs.backport.java.util.concurrent.helpers
Interface ThreadHelpers.UncaughtExceptionHandler
public static interface ThreadHelpers.UncaughtExceptionHandler
Abstraction of the exception handler which receives notifications of
exceptions occurred possibly in various parts of the system. Exception
handlers present attractive approach to exception handling in multi-threaded
systems, as they can handle exceptions that occurred in different threads.
This class is analogous to Thread.UncaughtExceptionHandler in J2SE 5.0.
Obviously you cannot use it the same way, e.g. you cannot assign the
handler to the thread so that it is invoked when thread terminates.
However, it can be
emulated
.
void | uncaughtException(Thread thread, Throwable error) - Notification of the uncaught exception that occurred within specified
thread.
|
uncaughtException
public void uncaughtException(Thread thread,
Throwable error)
Notification of the uncaught exception that occurred within specified
thread.
thread
- the thread where the exception occurrederror
- the exception