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: Jens Alfke <email@hidden>
- Date: Wed, 25 Sep 2013 10:24:21 -0700
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
_______________________________________________
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