summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/try-reraise.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/try-reraise.py')
-rw-r--r--tests/basics/try-reraise.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/basics/try-reraise.py b/tests/basics/try-reraise.py
index bc817fc386..bf5e77c0b0 100644
--- a/tests/basics/try-reraise.py
+++ b/tests/basics/try-reraise.py
@@ -1,4 +1,4 @@
-# Re-reraising last exception with raise w/o args
+# Reraising last exception with raise w/o args
def f():
try:
@@ -10,3 +10,10 @@ try:
f()
except ValueError as e:
print(repr(e))
+
+
+# Can reraise only in except block
+try:
+ raise
+except RuntimeError:
+ print("RuntimeError")