summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/exception_order_runme.py
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/python/exception_order_runme.py')
-rw-r--r--Examples/test-suite/python/exception_order_runme.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Examples/test-suite/python/exception_order_runme.py b/Examples/test-suite/python/exception_order_runme.py
index aa97e26e6..5c1529999 100644
--- a/Examples/test-suite/python/exception_order_runme.py
+++ b/Examples/test-suite/python/exception_order_runme.py
@@ -9,35 +9,35 @@ a = A()
try:
a.foo()
-except E1, e:
+except E1 as e:
pass
except:
- raise RuntimeError, "bad exception order"
+ raise RuntimeError("bad exception order")
try:
a.bar()
-except E2, e:
+except E2 as e:
pass
except:
- raise RuntimeError, "bad exception order"
+ raise RuntimeError("bad exception order")
try:
a.foobar()
-except RuntimeError, e:
+except RuntimeError as e:
if e.args[0] != "postcatch unknown":
raise RuntimeError("bad exception order {}".format(e.args))
try:
a.barfoo(1)
-except E1, e:
+except E1 as e:
pass
except:
- raise RuntimeError, "bad exception order"
+ raise RuntimeError("bad exception order")
try:
a.barfoo(2)
-except E2, e:
+except E2 as e:
pass
except:
- raise RuntimeError, "bad exception order"
+ raise RuntimeError("bad exception order")