try & catch in iPhone?

后端 未结 1 692

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)
提交回复
热议问题