summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m
diff options
context:
space:
mode:
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m
new file mode 100644
index 00000000..c8d6f6f2
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/oc/exceptions.m
@@ -0,0 +1,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;
+}