Files
clang-p2996/lldb/test/API/tools/lldb-dap/exception/objc/main.m
John Harrison 6421bd94ea [lldb-dap] Creating protocol types for setExceptionBreakpoints. (#144153)
This adds new types for setExceptionBreakpoints and adds support for
`supportsExceptionFilterOptions`, which allows exception breakpoints to
set a condition.

While testing this, I noticed that obj-c exception catch breakpoints may
not be working correctly in lldb-dap.
2025-06-16 17:24:48 -07:00

15 lines
399 B
Objective-C

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