Add missing files.
parent
aa775cf835
commit
7c79dfc4c5
@ -0,0 +1,22 @@
|
||||
#import "Test.h"
|
||||
|
||||
#import "stdio.h"
|
||||
|
||||
void poke_objcxx(void);
|
||||
|
||||
void rethrow(id x)
|
||||
{
|
||||
@throw x;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@try {
|
||||
printf("Poking from minRepM\n");
|
||||
poke_objcxx();
|
||||
printf("Poked from minRepM\n");
|
||||
} @catch (Test *localException) {
|
||||
printf("In NS_HANDLER block, %p\n", localException);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
#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");
|
||||
rethrow(localException);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue