Bugs item #1112743, was opened at 2005-01-30 14:32
Message generated for change (Settings changed) made by nneuberger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1112743&group_id=61302
Category: None
>Group: Release 1.3
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Garrett Smith (garrett1020)
>Assigned to: Nicholas Neuberger (nneuberger)
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
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development