KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > ThreadDeath


1 /*
2  * @(#)ThreadDeath.java 1.15 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.lang;
9
10 /**
11  * An instance of <code>ThreadDeath</code> is thrown in the victim
12  * thread when the <code>stop</code> method with zero arguments in
13  * class <code>Thread</code> is called.
14  * <p>
15  * An application should catch instances of this class only if it
16  * must clean up after being terminated asynchronously. If
17  * <code>ThreadDeath</code> is caught by a method, it is important
18  * that it be rethrown so that the thread actually dies.
19  * <p>
20  * The top-level error handler does not print out a message if
21  * <code>ThreadDeath</code> is never caught.
22  * <p>
23  * The class <code>ThreadDeath</code> is specifically a subclass of
24  * <code>Error</code> rather than <code>Exception</code>, even though
25  * it is a "normal occurrence", because many applications
26  * catch all occurrences of <code>Exception</code> and then discard
27  * the exception.
28  *
29  * @author unascribed
30  * @version 1.15, 12/19/03
31  * @see java.lang.Thread#stop()
32  * @since JDK1.0
33  */

34
35 public class ThreadDeath extends Error JavaDoc {}
36
Popular Tags