summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.72.0/tests/input/oc/exceptions.m
blob: c8d6f6f2853e6b69f260a78bed7cb8a5994fc064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

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;
}