• 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: Exception handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception handling


  • Subject: Re: Exception handling
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 14 Jun 2018 17:58:14 -0700

On Jun 14, 2018, at 11:33 , Casey McDermott <email@hidden> wrote:
>
> However, simply replacing the C++ throw with a Cocoa exception via
> [NSException raise : errString  format : errString]; seems to work great.
> Apparently it unwinds the call stack and is swallowed in the run loop.

Yes, but do be careful about exceptions thrown off the main thread. In (say)
GCD-owned threads, there’s nothing AFAIK to catch exceptions, and as someone
already mentioned, NSExceptions can’t successfully cross dylib/framework
boundaries.

_______________________________________________

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: Exception handling
      • From: Jens Alfke <email@hidden>
References: 
 >Re: Exception handling (From: Casey McDermott <email@hidden>)

  • Prev by Date: Re: Exception handling
  • Next by Date: Re: Exception handling
  • Previous by thread: Re: Exception handling
  • Next by thread: Re: Exception handling
  • Index(es):
    • Date
    • Thread