1. Pypy
  2. Untitled project
  3. pypy

Commits

Amaury Forgeot d'Arc  committed a0af6c1

A slightly better error message when an opcode is missing
in the "stack effect" map.

  • Participants
  • Parent commits 459148c
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/interpreter/astcompiler/assemble.py

View file
  • Ignore whitespace
         try:
             return _static_opcode_stack_effects[op]
         except KeyError:
-            return _stack_effect_computers[op](arg)
+            try:
+                return _stack_effect_computers[op](arg)
+            except KeyError:
+                raise KeyError("Unknown stack effect for %s (%s)" %
+                               (ops.opname[op], op))