20.21
java.lang.ThreadGroup
THE PACKAGE JAVA.LANG
20.21.31
public void uncaughtException(Thread t, Throwable e)
The general contract of
uncaughtException
is that it is called whenever a thread
that belongs directly to this thread group dies because an exception was thrown in
that thread and not caught. The arguments are the
Thread
object for the thread in
question and the
Throwable
object that was thrown. The
uncaughtException
method may then take any appropriate action.
The call to
uncaughtException
is performed by the thread that failed to
catch the exception, so
t
is the current thread. The call to
uncaughtException
is
the last action of the thread before it dies. If the call to
uncaughtException
itself
results in an (uncaught) exception, this fact is ignored and the thread merely goes
on to die.
The method
uncaughtException
defined by class
ThreadGroup
takes one
of two actions. If this thread group has a parent thread group, then this method is
invoked for that parent thread group, with the same arguments. If this thread group
is the system thread group (which has no parent), then if the exception
e
is not an
instance of
ThreadDeath
( 20.22), a stack trace ( 20.22.6) for
e
is printed on the
error output stream that is the value of the field
System.err
( 20.18.3).
Subclasses of
ThreadGroup
may override the
uncaughtException
method.
610
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved