Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

Commit

Permalink
Python: always raise Exceptions to fix Python 2 exceptions caught by …
Browse files Browse the repository at this point in the history
…a Python 3 runtime.
  • Loading branch information
wavexx committed Aug 11, 2014
1 parent f558583 commit 9bd266c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bond/Python/stage2.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __PY_BOND_repl():
return args

elif cmd == "EXCEPT":
raise args
raise args if isinstance(args, Exception) else Exception(args)

elif cmd == "ERROR":
raise _PY_BOND_SerializationException(args)
Expand Down
1 change: 1 addition & 0 deletions test/test_Python.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ def gen_exception():
try:
gen_exception()
except Exception as e:
print(e)
ret = (str(e) == "test")
return ret
''')
Expand Down

0 comments on commit 9bd266c

Please sign in to comment.