Bugs item #1112743, was opened at 2005-01-30 14:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1112743&group_id=61302
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Garrett Smith (garrett1020)
Assigned to: Nobody/Anonymous (nobody)
Summary: Exceptions are getting eaten by use of RuntimeException
Initial Comment:
There are some places where RuntimeExceptions are used
to wrap original exceptions, presumably to avoid
dealing with exceptions. But exceptions are supposed to
be testable!
E.g. AuthorizationRequiredException is pretty useful
stuff and shouldn't be hidden in the message of
RuntimeException.
I suggest providing the original 'cause' to
RuntimeException whenever it's used:
try {
<do something>
} catch (Exception e) {
String msg = ExceptionUtility.stackTraceToString(e);
throw new RuntimeException(msg, e);
}
So then we can at least assert something like:
assertTrue(e.getCause() instanceof
AuthorizationRequiredException);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1112743&group_id=61302
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development