Demonstrate rethrow in the example

This commit is contained in:
Jonathan Schleifer 2017-01-22 16:55:48 +01:00
parent 9eedf4ce0d
commit d74c7ca999
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3

View file

@ -40,9 +40,15 @@ main()
puts("this should not be called");
}
try {
throw(7);
} catch (ex) {
rethrow;
}
throw(5);
} catch (ex) {
printf("caught %d (should be 5)\n", ex);
printf("caught %d (should be 7)\n", ex);
}
try {