• 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: Andreas Grosam <email@hidden>
  • Date: Fri, 17 Dec 2010 09:25:02 +0100

> Look up NSExceptionHandler.
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Exceptions/Tasks/ControllingAppResponse.html
>
> --Kyle Sluder


The Exception-handling framework let you define the "logging and handling behavior for all uncaught exceptions, system-level exceptions, and runtime errors in all applications".

So, as stated, the framework may be used to affect these "Application Errors":
• uncaught NSExceptions
• system-level exceptions (such as invalid memory accesses)
• Objective-C runtime errors (such as messages sent to freed objects)


However, NSExceptions thrown in the main thread, and not caught by any lower level handler or not handled by custom handlers - make their way through to the top level handler which is installed by AppKit:

"Exceptions on the main thread of a Cocoa application are caught by the top-level handlers, which are usually installed by the Application Kit."

These *caught exceptions* do not fall under the category of "Application Errors" which are handled by the Exception-handling framework. So, the Exception-handling framework does not affect the behavior of these exceptions caught by NSApp. And NSApp does not handle these exceptions in any way - it just consumes or ignores them.



Andreas_______________________________________________

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

  • Prev by Date: Re: File name issue with German umlauts
  • Next by Date: Re: File name issue with German umlauts
  • Previous by thread: Re: App Will Not Terminate After Uncaught Excpetion
  • Next by thread: Re: App Will Not Terminate After Uncaught Excpetion
  • Index(es):
    • Date
    • Thread