commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-967) Code should never catch and ignore all Throwables
Date Thu, 06 Feb 2014 12:30:08 GMT
Sebb created LANG-967:
-------------------------

             Summary: Code should never catch and ignore all Throwables
                 Key: LANG-967
                 URL: https://issues.apache.org/jira/browse/LANG-967
             Project: Commons Lang
          Issue Type: New Feature
            Reporter: Sebb


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:

{code}
try {
    reader.close();
} catch (Throwable u) {
    ExceptionUtils.handleThrowable(u);
}
{code}

\[1] org.apache.tomcat.util.ExceptionUtils#handleThrowable()
\[2] https://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message