开发者

Try Catch Doesn't Work

开发者 https://www.devze.com 2023-03-22 03:47 出处:网络
I\'m getting this stack trace in the output window of XCode 开发者_开发知识库4: *** Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason: \'-[Page bottom]: unrecognized se

I'm getting this stack trace in the output window of XCode 开发者_开发知识库4:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Page bottom]: unrecognized selector sent to instance 0xfbdb1f0'

However, the calling code has a try catch

@try {
    [self restoreStateWithControlSurfaces:result];
}
@catch (NSException *exception) {
    NSLog(@"Failed at restoreStateWithControlSurfaces %@", exception);
    retVal = NO;
}

It might have something to do with NSHangOnOtherExceptionMask but I'm not sure how this fits together. How can I get my catch block to work? This is in the simulator for iPad 4.2.


A bug has been reported that prevents NSInvalidArgumentException from being caught. This bug appears to affect the simulator only.

0

精彩评论

暂无评论...
验证码 换一张
取 消