Using return and goto statements in exception handler
Using return and goto statements in exception handler
- Subject: Using return and goto statements in exception handler
- From: Frode <email@hidden>
- Date: Tue, 27 Jun 2006 17:47:02 +0200
Hi!
I'm compiling for Mac OS X 10.2 and have added compability code for
@try/@catch/@final blocks with NS_DURING/NS_HANDLER/NS_ENDHANDLER.
Is it natural to use return (and goto) statements within the section
of code between NS_HANDLER and NS_ENDHANDLER? I'm asking because it
is not until now I realize that NS_VALUERETURN and NS_VOIDRETURN are
only intent for the exception domain (section of code between
NS_DURING and NS_HANDLER).
The Apple documentation only discuss this briefly, but with the
trivial definition of NS_ENDHANDLER in NSException.h, together with
the standard way setjmp related exception executes between if-else
blocks, one is rather suppose to use return and goto.
Thanks for any clarifications.
Regards
Roger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden