• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: c++ exceptions in objective c call stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: c++ exceptions in objective c call stack
      • From: "Clark Cox" <email@hidden>
References: 
 >c++ exceptions in objective c call stack (From: "Jim Crafton" <email@hidden>)
 >Re: c++ exceptions in objective c call stack (From: Scott Ribe <email@hidden>)
 >Re: c++ exceptions in objective c call stack (From: "Jim Crafton" <email@hidden>)

  • Prev by Date: IKImageView crop/rotate issues
  • Next by Date: Re: c++ exceptions in objective c call stack
  • Previous by thread: Re: c++ exceptions in objective c call stack
  • Next by thread: Re: c++ exceptions in objective c call stack
  • Index(es):
    • Date
    • Thread