diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-26 01:20:49 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-26 01:40:37 +0300 |
commit | ae2c81ff388d9b06bc11ac1e14bd5d71b4f4637c (patch) | |
tree | a369534fb8baf8a3e318619d047d90c816fe9c46 /tests/misc | |
parent | 0f553fe10b14051aca25818b0aeac175c60889e0 (diff) | |
download | micropython-ae2c81ff388d9b06bc11ac1e14bd5d71b4f4637c.tar.gz micropython-ae2c81ff388d9b06bc11ac1e14bd5d71b4f4637c.zip |
vm: On exiting except block, clear sys.exc_info() value.
This doesn't handle case fo enclosed except blocks, but once again,
sys.exc_info() support is a workaround for software which uses it
instead of properly catching exceptions via variable in except clause.
Diffstat (limited to 'tests/misc')
-rw-r--r-- | tests/misc/sys_exc_info.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/misc/sys_exc_info.py b/tests/misc/sys_exc_info.py index 1aad6f1898..de5b825624 100644 --- a/tests/misc/sys_exc_info.py +++ b/tests/misc/sys_exc_info.py @@ -14,9 +14,8 @@ except: print(sys.exc_info()[0:2]) f() -# MicroPython currently doesn't reset sys.exc_info() value -# on exit from "except" block. -#f() +# Outside except block, sys.exc_info() should be back to None's +f() -# Recursive except blocks are not handled either - just don't -# use exc_info() at all! +# Recursive except blocks are not handled - just don't +# use exc_info() at all, use explicit variables in "except". |