Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Code should never catch and ignore all Throwables - ThreadDeath and VirtualMachineError must be rethrown.
It would be useful to provide a method to enforce this behaviour.
For example,. as is done by the Tomcat method [1] with source here [2]
Sample usage:
try { reader.close(); } catch (Throwable u) { ExceptionUtils.handleThrowable(u); }
[1] org.apache.tomcat.util.ExceptionUtils#handleThrowable()
[2] https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java