aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/tools/lldb-dap/exception/objc/main.m
blob: bbfa6219927997230246d4a7dc7a75ebbba4aebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#import <Foundation/Foundation.h>

int main(int argc, char const *argv[]) {
  @try {
    NSException *e = [[NSException alloc] initWithName:@"ThrownException"
                                      reason:@"SomeReason"
                                    userInfo:nil];
    @throw e;
  } @catch (NSException *e) {
    NSLog(@"Caught %@", e);
    @throw; // let the process crash...
  }
  return 0;
}