[Chapter 25] 25.62 java.lang.ThreadDeath (JDK 1.0)

#

| Chapter 25 The java.lang Package |

## 25.62 java.lang.ThreadDeath (JDK 1.0)

###

Signals that a thread should terminate. This error is thrown in a thread when the `Thread.stop()` method is called for that thread. This is an unusual `Error` type that simply causes a thread to be terminated, but does not print an error message or cause the interpreter to exit. You may catch `ThreadDeath` errors to do any necessary cleanup for a thread, but if you do, you must re-throw the error, so that the thread actually terminates.

    public class ThreadDeath extends Error {
        // Default Constructor: public ThreadDeath()
    }

### Hierarchy:

Object->Throwable(Serializable)->Error->ThreadDeath

java.lang.Thread (JDK 1.0) |  | java.lang.ThreadGroup (JDK 1.0)