Martin Buchholz wrote:
On Thu, Apr 15, 2010 at 20:02, Andrew Thompson
<[email protected]> wrote:
On Apr 14, 2010, at 6:49 AM, Bruce Chapman wrote:

One thing we definitely can do is to add a new constructor
to AssertionError, that takes a cause as an argument,
consistent with other exceptions.

Yeah, that was a minor niggle - I'll check  for an RFE and get the ball started 
on that.
Actually, it does exist, it is just disguised as taking Object:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/AssertionError.html#AssertionError(java.lang.Object)

An awesome find, Andrew.
I had skimmed the (many) constructors for AssertionError,
and never suspected that this method is the one we want.

It you want to RFE, I guess

AssertionError(String additionalDetails, Throwable cause)

I'm guessing it's not critical, because the message of the cause
is a pretty good message for the wrapped exception.

The best reason for the new constructor is that humans can find it!

Martin

Perhaps this is the bug you're looking for:
6935997 Please add a nested throwable constructor to AssertionError

-Joe

Reply via email to