Re: Silent Self-Caught Exceptions vs. "All Exceptions" Breakpoint
Re: Silent Self-Caught Exceptions vs. "All Exceptions" Breakpoint
- Subject: Re: Silent Self-Caught Exceptions vs. "All Exceptions" Breakpoint
- From: Alex Zavatone <email@hidden>
- Date: Wed, 25 Sep 2013 15:39:07 -0400
On Sep 25, 2013, at 1:24 PM, Jens Alfke wrote:
>
> On Sep 25, 2013, at 10:16 AM, Kyle Sluder <email@hidden> wrote:
>
>> Please note that the breakpoint traps on exception *throw*. It is perfectly valid—daresay common—for C++ code to throw and catch exceptions as a normal matter of course.
>
> Some of the system code does it, yeah; I know the innards of the Security framework do. But it’s widely considered bad design to use exceptions for normal flow control. It’s also expensive — modern “zero-overhead” exception runtimes make ‘try’ blocks very cheap but at the overhead of making ‘throw’ very slow.
>
> Anyway, as you said, the fix is to make your All Exceptions breakpoint ObjC-only. I’ve seen almost no system code that throws and internally catches Obj-C exceptions, although it might arise in code that uses DO or XPC.
>
> —Jens
Since this is so useful, is there any way to make each project we create automatically gets an exception breakpoint set to All Objective-C Exceptions?
Thanks.
_______________________________________________
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