尝试&赶上iPhone?

时间:2011-04-18 14:04:52

标签: iphone ios4 iphone-sdk-3.0

try{}catch结构对于C ++,Java和&相关语言。在iOS SDK中是否有这样的功能?

1 个答案:

答案 0 :(得分:92)

@try {
    // Try something
}
@catch (NSException * e) {
    NSLog(@"Exception: %@", e); 
}
@finally {
    // Added to show finally works as well
}