try/catch

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]; ?
}

One thought on “try/catch

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.