How to use try/catch:
Cup *cup = [[Cup alloc] init]; ? @try { ? [cup fill]; ? } @catch (NSException *exception) { NSLog(@"main: Caught %@: %@", [exception name], [exception reason]); ? } ? @finally { [cup release]; ? }
How to use try/catch:
Cup *cup = [[Cup alloc] init]; ? @try { ? [cup fill]; ? } @catch (NSException *exception) { NSLog(@"main: Caught %@: %@", [exception name], [exception reason]); ? } ? @finally { [cup release]; ? }