[ http://issues.apache.org/jira/browse/XERCESJ-1186?page=comments#action_12433661 ] Michael Glavassevich commented on XERCESJ-1186: -----------------------------------------------
Dave, there are some issues with doing that. Throwable.initCause() and the IllegalStateException(String, Throwable) constructor were added to the platform in JDK 1.4 and 5.0 respectively. Xerces runs on JDK 1.2 so can't call these unless it's done conditionally using reflection. Also, there's been some talk about changing SAXException [1] so that it uses the JDK 1.4 exception changing mechanism. If that modification is made the call to initCause() may throw an IllegalStateException if the cause was initialized in SAXException's constructor. [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6385694 > [PATCH] retain exception stack traces > ------------------------------------- > > Key: XERCESJ-1186 > URL: http://issues.apache.org/jira/browse/XERCESJ-1186 > Project: Xerces2-J > Issue Type: Improvement > Affects Versions: 2.8.1 > Reporter: Dave Brosius > Priority: Minor > Attachments: retain_stack_traces.diff > > > When a different exception is thrown from a catch block, you lose the > original stack trace where the exception occurred, making it more difficult > to figure out what went wrong. Add code to initialize the thrown exception's > initial cause, so the stack traces are retained. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
