made about AssertionError means something different.the AssertionError doesn't provide access to the object that generated it
All code in my posts, unless a source is explicitly mentioned, is my own.
Ruben Soto wrote:I think the key is in the constructors, and in what Omar said about getCause(). Look at the constructors for Error, for example. There is a constructor that is
Error(Throwable t)
Whereas the best you can do with AssertionError is:
AssertionError(Object o)
There is no constructor of the form AssertionError(Throwable t) which is what would set the cause in the AssertionError instance.
All code in my posts, unless a source is explicitly mentioned, is my own.
All code in my posts, unless a source is explicitly mentioned, is my own.
SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |