You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/11/26 09:52:17 UTC
DO NOT REPLY [Bug 5076] New: -
Don't wrap RuntimeExceptions
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5076>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5076
Don't wrap RuntimeExceptions
Summary: Don't wrap RuntimeExceptions
Product: Xerces2-J
Version: 2.0.0 [beta 2]
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: XNI
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: jjc@jclark.com
org.apache.xerces.parsers.StandardParserConfiguration.parse (both methods) has
the code
catch (Exception ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw new XNIException(ex);
}
This is annoying and inconvenient. If my code has a bug and
accordingly throws a RuntimeException, instead of getting a useful
stack trace showing what the exception was and where it occurred, I
get a useless stack trace saying an XNIException occurred in
StandardParserConfiguration. I would suggest that RuntimeExceptions
not be wrapped, i.e.
catch (RuntimeException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org