#import <Foundation/Foundation.h>
#import "Fraction.h"
int main(int argc, const char * argv[]) {
@autoreleasepool {
// insert code here...
Fraction *f = [[Fraction alloc] init];
@try {
[f print];
} @catch (NSException *exception) {
NSLog(@"Caught %@%@",[exception name],[exception reason]);
} @finally {
NSLog(@"Execution continues!");
}
}
return 0;
}
try标准代码块
最新推荐文章于 2023-12-26 15:43:36 发布