public class ThreadDeath extends Error
Thread.stop()
方法时, ThreadDeath
的实例被抛出在受害者线程中。
应用程序只能在异步终止之后清除该类的实例。 如果ThreadDeath
被一个方法所捕获,那么重要的是它被重新引导,使得线程实际上死亡。
该top-level error handler如果没有打印出一条消息ThreadDeath
是从来没有抓到。
类ThreadDeath
具体的子类Error
,而不是异常
,即使它是一个“正常现象”,因为许多应用程序赶上所有出现异常
,然后丢弃异常。
Constructor and Description |
---|
ThreadDeath() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.