java.lang.Thread.UncaughtExceptionHandlerpublic class ExitOnErrorThreadGroup
extends java.lang.ThreadGroup
ThreadGroup class. This class is used
by ChildMain.main(String[]) to run the target application. By using
this class, any Error other than ThreadDeath thrown by
threads created by the target application will be caught the process
terminated. By default, the JVM will only print a stack trace of the
Error and destroy the thread. However, when an uncaught
Error occurs, it normally means that the JVM has encountered a
severe problem. Hence, an orderly shutdown is a reasonable approach.
Note: not all threads created by the target application are guaranteed to
use this class. Target application's may bypass this class by creating a
thread using the Thread(ThreadGroup, String) or other similar
constructors.
| Constructor | Description |
|---|---|
ExitOnErrorThreadGroup(java.lang.String name) |
Constructs a new thread group.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
uncaughtException(java.lang.Thread t,
java.lang.Throwable e) |
Trap any uncaught
Error other than ThreadDeath and exit. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toStringpublic ExitOnErrorThreadGroup(java.lang.String name)
name - the name of the new thread grouppublic void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Error other than ThreadDeath and exit.uncaughtException in interface java.lang.Thread.UncaughtExceptionHandleruncaughtException in class java.lang.ThreadGroupt - the thread that is about to exite - the uncaught exceptionCopyright (c) 2001-2002 - Apache Software Foundation