tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36231] New: - getCause() null for ServletException
Date Wed, 17 Aug 2005 16:47:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36231>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36231

           Summary: getCause() null for ServletException
           Product: Tomcat 5
           Version: 5.5.9
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jleech@virtela.net


It seems that ServletException was written before getCause() was added to
Throwable (jdk 1.4), and thus has its own getRootCause().  So generic error
handling is unnecessarily harder, stack traces incomplete, etc. when a
ServletException is thrown; e.g. in the ApplicationFilterChain code.

I think ServletException should be changed, but the behavior could be changed
even if thats not possible.  For example, when throwing a ServletException with
a root cause exception, also call the initCause() method.  It returns a
reference to itself, so you could even do throw (ServletException)new
ServletException(msg, e).initCause(e); (or something similar if that doesn't
compile).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message