Q: Is it true that ThreadDeath exception was "secret" and accidentally exposed to public?
5174 Since 25th November, 2003
Select and Copy the Code
Yes it is true. The original implementation was not intended to show it to us. But due to some
mistakes of SUN programmers it got out and now it is a part of API.
Warning: "An application should catch instances of this class only if it must clean up after being
terminated asynchronously. If ThreadDeath is caught by a method, it is important that it be rethrown so
that the thread actually dies." from API reference for java.lang.ThreadDeath.