Monday, July 16, 2012
Exception Handling in Objective C
So this is a brief code snippet explaining how to use the try catch to do exception handling
//Code on which you want to put the check
@catch (NSException *exception)
//This finds out which kind of exception it is.
NSLog(@"main: Caught %@: %@", [exception name], [exception reason]);
//This piece of code executes no matter whether an exception occured or not.
Share to Twitter
Share to Facebook
Share to Pinterest
Post a Comment
Post Comments (Atom)