Hi and Thanks Jens,

> On 26 Apr 2016, at 17:58, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On Apr 26, 2016, at 7:28 AM, Dave <d...@looktowindward.com 
>> <mailto:d...@looktowindward.com>> wrote:
>> 
>> I have the “All Objective-C Exceptions” breakpoint enabled. I’m calling a 
>> third party method that calls into the Core Foundation layer and this causes 
>> an exception. The method handles the exception by using @catch and deals 
>> with the problem internally.
> 
> Yeah, this is a pain. I haven’t run into library code that does this with 
> Obj-C exceptions, but Apple’s Security framework does it with C++ exceptions. 
> It’s a bad idea because (a) throwing exceptions is expensive, (b) exceptions 
> should be used for true failure conditions, not as flow control, and (c) it 
> bollocks up exception breakpoints.
> 
> Can you fix the 3rd party framework to avoid triggering the exception? Or at 
> least file a bug report?

No, not really it makes some CF calls and they throw, apparently the problem 
has been reported to Apple and they agree its a bug and their work-around is to 
catch the exceptions…...

> 
>> My problem is that it is causing the  “All Objective-C Exceptions” to 
>> trigger which causes a hiccup in my App. I switched it off but now other 
>> real exceptions are being ignored too. Is there any way to set it up so that 
>> it doesn’t breakpoint on the ones in the Third Party Method but does 
>> breakpoint on all others?
> 
> The only thing I can think of would be to edit the breakpoint and use the 
> ‘Add Action’ button to add some LLDB commands that will tell the debugger to 
> continue if it’s in the 3rd party library. But my knowledge of LLDB commands 
> is at the kindergarten level, so I can’t help you with that :(

The thing is that although I have the 3rd party framework as a separate 
.framework bundle, I am at the moment including the project as a sub-probject 
of my project, so I have the source inline.

It may be that if it were in a third party framework that it would be ok.

I had thought that there was a option to only trigger the breakpoint if the 
exception is uncaught, which in this case it *is* caught, but that option seems 
to have disappeared.

I know less about LLDB than you do, and as it’s not in a separate framework 
file I don’t think it can be done anyway.

Cheers
Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to