4
我在XCode中4的輸出窗口獲取該堆棧跟蹤:嘗試捕捉不起作用
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Page bottom]: unrecognized selector sent to instance 0xfbdb1f0'
然而,調用代碼有一個嘗試捕捉
@try {
[self restoreStateWithControlSurfaces:result];
}
@catch (NSException *exception) {
NSLog(@"Failed at restoreStateWithControlSurfaces %@", exception);
retVal = NO;
}
它可能有與NSHangOnOtherExceptionMask
有關,但我不知道這是如何適合在一起。我怎樣才能讓我的catch塊工作?這是在iPad 4.2的模擬器中。
'[self restoreStateWithControlSurfaces:result];'是否可能不是異常的原因?或者甚至在另一個線程上發生異常? –
@Alex Nichol,不,謝謝XCode讓我點擊堆棧跟蹤...查看接受的答案(下圖)。 –
在WWDC 2011上注意到,** Apple **的工程師都沒有使用模擬器,他們都有一個連接到他們的開發機器 – bshirley