Re: Scope variable pattern
Re: Scope variable pattern
- Subject: Re: Scope variable pattern
- From: Rosyna <email@hidden>
- Date: Fri, 11 May 2007 10:49:08 -0700
This is not true for Objective-C exceptions. See
http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/Objective_002dC-and-Objective_002dC_002b_002b-Dialect-Options.html
"As mentioned above, the new exceptions do not support handling types
other than Objective-C objects. Furthermore, when used from
Objective-C++, the Objective-C exception model does not interoperate
with C++ exceptions at this time. This means you cannot @throw an
exception from Objective-C and catch it in C++, or vice versa (i.e.,
throw ... @catch)."
This point is extremely important in this context. If you throw and
objective-c exception, it'll be handled by an objective-c exception
handler (if one exists, if not, the default lame handler will be
used).
There is no interoperation of Objective-C and C++ exceptions and
destructors will not be called if an Objective-C exception is thrown.
If someone throws an Objective-C exception in the middle of that
code, you're donkey poo'd.
Ack, at 5/11/07, Roy Lovejoy said:
a) it's exception safe. if someone throws in the middle of the
scope, or calls a routine that throws in the middle, the clean up
will take place. not so with a second line. huge benefit
--
Sincerely,
Rosyna Keller
Technical Support/Carbon troll/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden