开发者

Try Catch Doesn't Work

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜