NSException* myException = [NSException exceptionWithName:@"TestExcpetion" reason:@"Just testing" userInfo:nil]; @throw myException;
Friday, 29 May 2015
Throw an exception in Obj C
I've just been implementing HockeyApp and GetSentry crash reporting in one of our iOS native apps, and this handy piece of code came in useful for testing what happens when an exception is thrown.
Subscribe to:
Posts (Atom)