Author: Armin Rigo <[email protected]>
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
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to