Re: Exception handling
Re: Exception handling
- Subject: Re: Exception handling
- From: Jens Alfke <email@hidden>
- Date: Thu, 14 Jun 2018 10:16:51 -0700
> On Jun 14, 2018, at 10:11 AM, Alastair Houghton
> <email@hidden> wrote:
>
> I don’t think it’s changed in any obvious way; the framework has always
> swallowed exceptions in certain contexts, but not in others. Obviously the
> precise detail may have changed over time, but it’s certainly crashed on
> exceptions for as long as I remember, outside of the places where they get
> ignored for whatever reason.
I definitely remember that when I started Cocoa programming in 2000, up until
at least 2005, NSRunLoop caught exceptions and the app kept running. I was kind
of surprised when that changed.
> Perhaps you’re thinking of NSSetUncaughtExceptionHandler()? I don’t think
> there’s much you can usefully do from that, though, besides logging the
> exception.
Yes, that's it! I used to set that to capture the exception info (like the
backtrace), and then schedule a delayed-perform to pop up the alert when it was
safe. I have no idea whether it would still work.
—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