Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] SoftException and getCause()

True, this has been a TODO long-neglected that could safely
have been put in 1.1.1.

A bug is the best way to get something like this into the plan,
so I added one:

   https://bugs.eclipse.org/bugs/show_bug.cgi?id=49250

Thanks -
Wes

Ramnivas Laddad wrote:

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/
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev




Back to the top