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: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to