• 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: Uncaught exceptions not terminating my app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uncaught exceptions not terminating my app


  • Subject: Re: Uncaught exceptions not terminating my app
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 28 Jan 2010 08:34:40 -0800

On Jan 28, 2010, at 12:10 AM, Paul Sanders wrote:

> If you don't crash the app, you don't get the stack trace.  No
> stack trace = no clue about what went wrong.

That's why I said the error alert should include the same "Report" button as the crash report would.

> And we do offer to
> save the user's work (in the NSExceptionHandler delegate) before
> we bail out.

That's fairly dangerous. At that point you have no idea what's on the stack or what operations are halfway done. If you're doing inside a half-completed AppKit or HLTB call, putting up any UI creates re-entrant calls. If you're inside your own code, you're calling yourself re-entrantly when you save.

It's safer to save away the exception info, let the stack unwind fully, and then on the next runloop cycle put up the alert:

http://bitbucket.org/snej/myutilities/src/tip/ExceptionUtils.m

—Jens_______________________________________________

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: Uncaught exceptions not terminating my app
      • From: "Paul Sanders" <email@hidden>
References: 
 >Uncaught exceptions not terminating my app (From: "Paul Sanders" <email@hidden>)
 >Re: Uncaught exceptions not terminating my app (From: Ken Thomases <email@hidden>)
 >Re: Uncaught exceptions not terminating my app (From: "Paul Sanders" <email@hidden>)
 >Re: Uncaught exceptions not terminating my app (From: Jens Alfke <email@hidden>)
 >Re: Uncaught exceptions not terminating my app (From: "Paul Sanders" <email@hidden>)

  • Prev by Date: how can i do the equivalent of "new email with selection" service?
  • Next by Date: Re: Hot to define a connection from source code?
  • Previous by thread: Re: Uncaught exceptions not terminating my app
  • Next by thread: Re: Uncaught exceptions not terminating my app
  • Index(es):
    • Date
    • Thread