logo       

RE: Re: distinguishing between failures and errors: msg#00168

java.junit.user

Subject: RE: Re: distinguishing between failures and errors


> From: neil_swingler [mailto:neil_swingler@xxxxxxxxx]

> Have you not been in the position of debugging a stacktrace to find
> that it was just a rethrow of another exception which has now been
> lost?

That's why JDK 1.4 supports chained exceptions. If you throw a new
exception, you can (and should) pass along the previous exception
when you construct the new exception.

The original exception and its stack trace are accessible
(programmatically and in the stack trace of the new (wrapping)
exception.


Daniel




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise