Commits

Maciej Fijalkowski committed 7ec5c5f

report errors

  • Participants
  • Parent commits 3acdb89
  • Branches pypy-in-a-box

Comments (0)

Files changed (1)

File pypy/objspace/std/embedding.py

     s = rffi.charp2str(ll_s)
     w_globals = space.fromcache(Cache).w_globals
     ec = space.getexecutioncontext()
-    code_w = ec.compiler.compile(s, '<input>', 'exec', 0)
-    code_w.exec_code(space, w_globals, w_globals)
+    try:
+        code_w = ec.compiler.compile(s, '<input>', 'exec', 0)
+        code_w.exec_code(space, w_globals, w_globals)
+    except OperationError, e:
+        e.write_unraisable(space, "compiling of functions")
 
 @export_function([rffi.CCHARP, lltype.Signed, rffi.CArrayPtr(rffi.VOIDP)],
                  rffi.VOIDP)