Home » openjdk-7 » java » lang » [javadoc | source]
java.lang
public class: ThreadDeath [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Error
         java.lang.ThreadDeath

All Implemented Interfaces:
    Serializable

An instance of {@code ThreadDeath} is thrown in the victim thread when the (deprecated) Thread#stop() method is invoked.

An application should catch instances of this class only if it must clean up after being terminated asynchronously. If {@code ThreadDeath} is caught by a method, it is important that it be rethrown so that the thread actually dies.

The {@linkplain ThreadGroup#uncaughtException top-level error handler} does not print out a message if {@code ThreadDeath} is never caught.

The class {@code ThreadDeath} is specifically a subclass of {@code Error} rather than {@code Exception}, even though it is a "normal occurrence", because many applications catch all occurrences of {@code Exception} and then discard the exception.

Fields inherited from java.lang.Error:
serialVersionUID
Methods from java.lang.Throwable:
addSuppressed,   fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   getStackTraceDepth,   getStackTraceElement,   getSuppressed,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait