[pypy-commit] pypy rpython-error-to-systemerror: Print another interp-level traceback here, because this place normally
arigo
pypy.commits at gmail.com
Mon Nov 7 09:20:15 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: rpython-error-to-systemerror
Changeset: r88174:6a5fc03446f2
Date: 2016-11-07 15:19 +0100
http://bitbucket.org/pypy/pypy/changeset/6a5fc03446f2/
Log: Print another interp-level traceback here, because this place
normally eats the rest of the interp-level traceback
diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -712,6 +712,8 @@
if not we_are_translated():
raise
raise e
+ except OperationError:
+ raise
except KeyboardInterrupt:
raise OperationError(space.w_KeyboardInterrupt, space.w_None)
except MemoryError:
@@ -722,6 +724,14 @@
"maximum recursion depth exceeded")
except RuntimeError: # not on top of py.py
raise OperationError(space.w_RuntimeError, space.w_None)
+ except Exception as e: # general fall-back
+ if we_are_translated():
+ from rpython.rlib.debug import debug_print_traceback
+ debug_print_traceback()
+ # propagate the exception anyway, which will be turned
+ # into a proper OperationError(SystemError) when we
+ # reach PyFrame.execute_frame()
+ raise
# (verbose) performance hack below
More information about the pypy-commit
mailing list