[Chapter 12] ThreadDeath
Author: Mark Grand and Jonathan Knudsen
Date: Fri Aug 8 17:07:00 1997

#

| Chapter 12 The java.lang Package |

# ThreadDeath

## Name

ThreadDeath

## Synopsis

Class Name:

  `java.lang.ThreadDeath`

Superclass:

  `java.lang.Error`

Immediate Subclasses:

  None

Interfaces Implemented:

  None

Availability:

  JDK 1.0 or later

## Description

A `ThreadDeath` object is thown by the `stop()` method of a `Thread` object to kill the thread. Catching `ThreadDeath` objects is not recommended. If it is necessary to catch a `ThreadDeath` object, it is important to rethrow the object so that it is possible to cleanly stop the catching thread.

## Class Summary

    public class java.lang.ThreadDeath extends java.lang.Error {
      // Constructors
      public ThreadDeath();
    }

## Constructors

### ThreadDeath

#### public ThreadDeath()

Description

  This constructor creates a `ThreadDeath` object with no associated detail message.

## Inherited Methods

Method | Inherited From | Method | Inherited From
--- | --- | --- | ---
`clone()` | `Object` | `equals(Object)` | `Object`
`fillInStackTrace()` | `Throwable` | `finalize()` | `Object`
`getClass()` | `Object` | `getLocalizedMessage()` | `Throwable`
`getMessage()` | `Throwable` | `hashCode()` | `Object`
`notify()` | `Object` | `notifyAll()` | `Object`
`printStackTrace()` | `Throwable` | `printStackTrace(PrintStream)` | `Throwable`
`printStackTrace(PrintWriter)` | `Throwable` | `toString()` | `Object`
`wait()` | `Object` | `wait(long)` | `Object`
`wait(long, int)` | `Object` |  |

## See Also

`Error`, `Thread`, `Throwable`

Thread |  | ThreadGroup