0

This is more a nuisance than a real problem, but when I run a library, using NSException in the control flow, on the debugger, the program repeatedly stops on the NSException line like there were a breakpoint to finally proceed regularly without crashing. When I execute the app stand alone there is no appreciable effect. Is there a way to disable this annoying debug behavior. This is the simple handling function:

- (void) parse {
    while (1) {
        @try {
            [self scanAttribute];
        }
        @catch (NSException *exception) {
            return;
        }
    }
}

- (void) rejectWithReason:(NSString *)msg {
    [NSException raise:@"MKDistinguishedNameParserException" format:@"%@", msg];
}
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
  • Dont use Exceptions to control your program / control flow! – luk2302 May 01 '15 at 14:09
  • Unfortunately that code is not mine, I would not have ever used such a weird control structure, but comes from the core of MumbleKit and frankly I would not like to put my fingers inside it as it takes very little for the Voip abruptly not to work any longer with no idea about the reason. https://github.com/mumble-voip/mumblekit/blob/master/src/MKDistinguishedNameParser.m line:95 – Fabrizio Bartolomucci May 01 '15 at 14:26

1 Answers1

0

Do you have "Exception Breakpoints" turned on in this Xcode project? Click on the "Breakpoints" item in the group viewer over on the RHS of Xcode, and make sure you don't have an ObjC exception breakpoint set there.

Jim Ingham
  • 25,260
  • 2
  • 55
  • 63