Re: App Will Not Terminate After Uncaught Excpetion
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