[pypy-commit] pypy pypy-in-a-box: report errors

fijal noreply at buildbot.pypy.org
Wed Jul 18 17:18:08 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: pypy-in-a-box
Changeset: r56172:7ec5c5f0f008
Date: 2012-07-18 17:17 +0200
http://bitbucket.org/pypy/pypy/changeset/7ec5c5f0f008/

Log:	report errors

diff --git a/pypy/objspace/std/embedding.py b/pypy/objspace/std/embedding.py
--- a/pypy/objspace/std/embedding.py
+++ b/pypy/objspace/std/embedding.py
@@ -36,8 +36,11 @@
     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)


More information about the pypy-commit mailing list