ThreadGroupEx.uncaughtException

Called by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception, and the thread does not have a specific {@link Thread.UncaughtExceptionHandler} installed. <p> The {@code uncaughtException} method of {@code ThreadGroupEx} does the following: <ul> <li>If this thread group has a parent thread group, the {@code uncaughtException} method of that parent is called with the same two arguments. <li>Otherwise, this method checks to see if there is a {@linkplain Thread#getDefaultUncaughtExceptionHandler default uncaught exception handler} installed, and if so, its {@code uncaughtException} method is called with the same two arguments. <li>Otherwise, this method determines if the {@code Throwable} argument is an instance of {@link ThreadDeath}. If so, nothing special is done. Otherwise, a message containing the thread's name, as returned from the thread's {@link Thread#getName getName} method, and a stack backtrace, using the {@code Throwable}'s {@link Throwable#printStackTrace printStackTrace} method, is printed to the {@linkplain System#err standard error stream}. </ul> <p> Applications can override this method in subclasses of {@code ThreadGroupEx} to provide alternative handling of uncaught exceptions.

@param t the thread that is about to exit. @param e the uncaught exception.

class ThreadGroupEx
void
uncaughtException
(
Thread t
,
Throwable e
)

Meta