Re: NSForwardException and InvocationTargetException?
Re: NSForwardException and InvocationTargetException?
- Subject: Re: NSForwardException and InvocationTargetException?
- From: Hsu <email@hidden>
- Date: Fri, 28 Mar 2003 08:32:44 -0800
My understanding is that NSForwardException is very similar to an
InvocationTargetException; generally an NSForwardException is a
RuntimeException (so it doesn't have to be caught or declared in code;
I'm not necessarily endorsing the idea) that encapsulates another
(non-runtime) exception.
I believe that the WO runtime is trying to be "nice" when you ask for
the original exception, it will attempt to unwrap as many intermediate
exceptions as possible.
Karl
On Wednesday, March 26, 2003, at 12:25 PM, Jonathan Rochkind wrote:
Can anyone explain the weird relationship between
InvocationTargetException and NSForwardException?
If, just for testing purposes, I actually manually throw an
InvocationTargetException in my code... in
Applicaiton.handleException(), the exception I get passed in as an
argument is actually an NSForwardException----who's
originalException() is NOT an InvocationTargetException, but rather is
the original InvocationTargetException's getTargetException(). If
you're following, the InvocationTargetException has been magically
transformed to a similar NSForwardException. Which has had it's stack
trace filled in to the same line as the original
InvocationTargetException, to make matters more confusing.
But, I am currently logging all exceptions that make it up to the
Application.handleException. And I DO have InvocationTargetExceptions
in the log. So sometimes InvocationTargetException IS passed in to
handleException. To make matters more mysterious, when I look at the
stackTrace of that logged InvocationTargetException---it's coming from
a line where I have no idea how that line could have generated an
InvocationTargetException. I expect it generated some other exception,
and WO chose to wrap it in an InvocationTargetException (instead of in
an NSForwardException?!?!)
So, I'm not even sure what it is I'm asking. But there's something
wacky going on with WO and InvocationTargetException and
NSForwardException. Can anyone explain all this stuff? Is there
useful documentation somewhere?
--Jonathan
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Therapy is expensive, poppin' bubble wrap is cheap! You choose.
Homepage:
http://homepage.mac.com/khsu/index.html
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.