Try Catch Statement doesn't work on Simulator

2019-06-06 00:48发布

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

1条回答
趁早两清
2楼-- · 2019-06-06 01:34

This is a known bug that will be fixed in a future release.

查看更多
登录 后发表回答