Re: c++ exceptions in objective c call stack
Re: c++ exceptions in objective c call stack
- Subject: Re: c++ exceptions in objective c call stack
- From: Uli Kusterer <email@hidden>
- Date: Sat, 5 Jul 2008 19:11:48 +0200
On 05.07.2008, at 17:01, Jim Crafton wrote:
You cannot throw C++ exceptions across Objective-C functions. If
you want to
catch this exception, you will have to catch it in drawRect, and
decide
there what to do with it.
The earlier emails seem to mention that for 64bit apps this will not
be a problem. Is that the case or did I misunderstand them?
Well, define "problem": Of course, most C++ code will not try to catch
or re-throw anything but std::exception-based exceptions, so you might
still get odd behaviour because there's an NSException* thrown, or
it'll just show up as an "unknown exception". But yeah, it won't trash
your stack on 64-bit if you throw from C++ through ObjC or ObjC++. Of
course, if you throw *anything* through straight C, it will still
cause problems. But that's that way for any C++, ObjC or longjmp that
marches through straight C code.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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