• 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: App Will Not Terminate After Uncaught Excpetion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App Will Not Terminate After Uncaught Excpetion


  • Subject: Re: App Will Not Terminate After Uncaught Excpetion
  • From: Nick Zitzmann <email@hidden>
  • Date: Thu, 16 Dec 2010 09:32:31 -0700

On Dec 16, 2010, at 6:38 AM, Andreas Grosam wrote:

> In Cocoa, exceptions are considered fatal errors, and code is usually not exception safe.

[citation needed]

> That is, after catching an exception, it is very probable that the application state is corrupted and can not be restored. So, is continuing the app after an uncaught exception occurred expected behavior?

Yes.

> Shouldn't the default behavior in Cocoa cause the app to terminate as soon as possible?

No.

> But since there is no such delegate method, how can I change the default behavior?
> Do I have to override NSApplication's -run method in order to terminate after an uncaught exception, and if yes, how?

See <https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniAppKit/OAApplication.m> for one such example.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

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: App Will Not Terminate After Uncaught Excpetion
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >App Will Not Terminate After Uncaught Excpetion (From: Andreas Grosam <email@hidden>)

  • Prev by Date: Re: what's the correct key path to observe for a BOOL property?
  • Next by Date: Re: App Will Not Terminate After Uncaught Excpetion
  • Previous by thread: App Will Not Terminate After Uncaught Excpetion
  • Next by thread: Re: App Will Not Terminate After Uncaught Excpetion
  • Index(es):
    • Date
    • Thread