Demonstrate rethrow in the example
This commit is contained in:
parent
9eedf4ce0d
commit
d74c7ca999
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue