diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-26 14:42:17 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-26 17:32:02 +0200 |
commit | c403076ef8c534836a441374ef0366027946de50 (patch) | |
tree | 6c55753ab7863e8cec255696035192aadb2dfd1f /tests/basics/try-reraise.py | |
parent | 38f0c607b0626ecee9cb2e4aefb25c3756232dab (diff) |
vm: Implement raise statement w/o args (reraising last exception).
Diffstat (limited to 'tests/basics/try-reraise.py')
-rw-r--r-- | tests/basics/try-reraise.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/try-reraise.py b/tests/basics/try-reraise.py new file mode 100644 index 000000000..bc817fc38 --- /dev/null +++ b/tests/basics/try-reraise.py @@ -0,0 +1,12 @@ +# Re-reraising last exception with raise w/o args + +def f(): + try: + raise ValueError("val", 3) + except: + raise + +try: + f() +except ValueError as e: + print(repr(e)) |