• 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: Exception handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception handling


  • Subject: Re: Exception handling
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 14 Jun 2018 10:00:13 -0700


> On Jun 13, 2018, at 7:22 PM, Casey McDermott <email@hidden> wrote:
>
> Our Carbon event loop had a try/catch block, which caught most exceptions,
> and then
> continued.  It started as an expedient in early production, but it remained
> in production code
> since it often allows users to continue, save their work, etc.

That's actually how Cocoa used to work. I can't recall whether an alert panel
popped up or if it was just silent. The behavior changed to crashing sometime
in the past, um, 8 years or so.

> Is there a way to override the event loop in Cocoa?  Some other way we can
> escape to
> the event loop and then continue from there?

There used to be either a callback or an overridable NSApplication method to
handle an uncaught exception, but looking at current headers I can't find what
I'm looking for; maybe it's been gone for a long time and removed?

—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: Exception handling
      • From: Alastair Houghton <email@hidden>
References: 
 >Exception handling (From: Casey McDermott <email@hidden>)

  • Prev by Date: Re: Exception handling
  • Next by Date: Re: Exception handling
  • Previous by thread: Re: Exception handling
  • Next by thread: Re: Exception handling
  • Index(es):
    • Date
    • Thread