• 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: Dave Keck <email@hidden>
  • Date: Thu, 16 Dec 2010 17:50:16 -0500

> Look up NSExceptionHandler.

NSExceptionHandler (and NSSetUncaughtExceptionHandler for that matter)
can't help because the exception is being caught by AppKit.
Furthermore, the NSApplication subclass technique mentioned earlier
won't work in all cases either, since some AppKit/Foundation wrap
callouts with try/catch, and don't call NSApplication's
-reportException: with the thrown exceptions. For example, an
exception thrown in the -applicationDidFinishLaunching: delegate
method simply can't be caught.

(That said, NSHandleOtherExceptionMask will allow your
NSExceptionHandler delegate method to be called for exceptions that
were caught normally, and therefore will work for cases where
exceptions are caught by AppKit. But of course, using that to
terminate your app makes the assumption that no code in your process
is using exceptions for flow control, etc. I know of one case at least
– NSConnection/NSPort – where exceptions can occur in the normal
course of execution.)
_______________________________________________

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

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: NSSlider Mouse Up
  • Next by Date: Re: NSSlider Mouse Up
  • 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