You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
632 B
28 lines
632 B
|
|
int main(int argc, const char *argv[])
|
|
{
|
|
@try
|
|
{
|
|
[NSException raise: NSInternalInconsistency
|
|
format: @"An internal inconsistency was raised"];
|
|
}
|
|
@catch (NSException *e)
|
|
{
|
|
NSLog(@"Catch");
|
|
}
|
|
@finally
|
|
{
|
|
NSLog(@"Finally");
|
|
}
|
|
|
|
@throw [NSException exceptionWithName: @"foo" reason: @"bar" userInfo: nil];
|
|
|
|
NSException *exception = [NSException exceptionWithName: @"HotTeaException"
|
|
reason: @"The tea is too hot"
|
|
userInfo: nil];
|
|
|
|
@throw exception;
|
|
|
|
return 0;
|
|
}
|