[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-dev] SoftException and getCause()
|
Hello,
While debugging a problem in aTrack (https://atrack.dev.java.net/),
I needed SoftException to show the cause (the softened exception
and its cause, recursively). So I modified SoftException.java to
add the following line:
public Throwable getCause() { return inner; }
Now I get the information I need (an exception trace on web page).
A few questions:
1. While modifying SoftException.java, I notice that there is
a TODO note discussing getCuase() and chained exception.
Is there a deeper issue with the fix such as above?
It seems that adding getCause() will not cause any problem for
1.3- folks while benefiting 1.4+ developers.
2. Should getWrappedThrowable() be deprecated in favor of
getCause()?
BTW, the getCause() vs. getWrappedThrowable() has got me on
more than one occasion. I habitually use getCuase() only to
realize that with SoftException, I should have used
getWrappedThrowable().
-Ramnivas
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/