try & catch in iPhone?

后端 未结 1 693

The try{}catch construct is common to C++, Java & related languages. In the iOS SDK is there and any functionality like this?

相关标签:
1条回答
  • 2020-12-14 01:40
    @try {
        // Try something
    }
    @catch (NSException * e) {
        NSLog(@"Exception: %@", e); 
    }
    @finally {
        // Added to show finally works as well
    }
    
    0 讨论(0)
提交回复
热议问题