Exception handling
template
@try { // process may include exception } @catch(NSException *e) { NSLog(@"Name: %@", [e name]); NSLog(@"Reason: %@", [e reason]); // append if any process exist }
ex
@try { SampleCustomViewController *viewController = [nib instantiateWithOwner:nil options:nil][0]; return viewController; } @catch(NSException *e) { NSLog(@"Name: %@", [e name]); NSLog(@"Reason: %@", [e reason]); return nil; }