Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,4 @@
@interface MyException : NSException {
//Put specific info in here
}
@end

View file

@ -0,0 +1,4 @@
- (void)foo {
@throw [NSException exceptionWithName:@"TerribleException"
reason:@"OMGWTFBBQ111!1" userInfo:nil];
}

View file

@ -0,0 +1,16 @@
@try {
[self foo];
}
@catch (MyException *exc) {
//Catch only your specified type of exception
}
@catch (NSException *exc) {
//Catch any NSException or subclass
NSLog(@"caught exception named %@, with reason: %@", [exc name], [exc reason]);
}
@catch (id exc) {
//Catch any kind of object
}
@finally {
//This code is always executed after exiting the try block
}