Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Exceptions/Objective-C/exceptions-3.m
Normal file
16
Task/Exceptions/Objective-C/exceptions-3.m
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue