Re: NS_DURING and return
Re: NS_DURING and return
- Subject: Re: NS_DURING and return
- From: "Timothy J. Wood" <email@hidden>
- Date: Mon, 13 Feb 2006 18:14:15 -0800
NS_VALUERETURN/NS_VOIDRETURN inside the NS_DURING/NS_HANDLER block
can be used (see <http://developer.apple.com/documentation/Cocoa/
Conceptual/Exceptions/index.html>).
On the other hand, you can turn on ObjC exception syntax and then
just use 'return' (the compiler will handle it) _and_ you can then
use @finally (see <http://developer.apple.com/documentation/
DeveloperTools/gcc-3.3/gcc/Objective_002dC-Dialect-Options.html>)
-tim
On Feb 13, 2006, at 2:09 AM, Stephane Sudre wrote:
Stupid question:
Since the following code is not supported.
NS_DURING
return something;
NS_HANDLER
return anotherThing;
NS_ENDHANDLER
What other solutions exist?
1. using an intermediate var and moving the return outside the
NS_DURING. That is the solution I'm using.
2. Is NS_VALUERETURN what shall be used instead of return in such a
case?
_______________________________________________
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
_______________________________________________
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