You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
457 B
Plaintext

#import "Test.h"
#import "stdio.h"
extern "C" void rethrow(id);
extern "C" void poke_objcxx(void)
{
@try {
printf("Raising MyException\n");
Test *e = [Test new];
@throw e;
} @catch (Test *localException) {
printf("Caught - re-raising\n");
[localException retain];
localException = [localException autorelease];;
rethrow(localException);
} @catch(...) {
printf("Caught in catchall\n");
}
}