简体   繁体   中英

Try Catch Statement doesn't work on Simulator (but works on iPhone!!!)

I have an Exception catching statement in my code, like the following:

@try {
      for(NSDictionary* s in users)
      {
           do something ....
      }
 }
 @catch (NSException * exception) {
      NSLog(@"APIRequesetBase readUserInfo: Caught %@: %@", [exception name], [exception reason]);
 }
 @finally {

 }

So this try statement works perfectly on the iphone device, it can catch the exception. However, on simulator, it can never catch the exception. It just crashes!!

I also try other simple try catch statement to test it, and the simulator can never catch the exception. It just simply crashes!!

This issue is so strange. Does anyone have this issue before?

Or is it because of the setting?

Thanks

这是一个已知的错误,将在以后的版本中修复。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM