From d74c7ca999368e7bdaf4e408dcff4b63149cb32c Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sun, 22 Jan 2017 16:55:48 +0100 Subject: [PATCH] Demonstrate rethrow in the example --- example.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example.c b/example.c index 2534006..199832d 100644 --- a/example.c +++ b/example.c @@ -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 {