[pypy-commit] pypy default: Report at least a little bit more clearly than "Fatal RPython error:

arigo noreply at buildbot.pypy.org
Tue Sep 25 15:50:37 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r57574:f62e922e0c5f
Date: 2012-09-25 15:50 +0200
http://bitbucket.org/pypy/pypy/changeset/f62e922e0c5f/

Log:	Report at least a little bit more clearly than "Fatal RPython error:
	OSError".

diff --git a/pypy/module/_ffi/interp_funcptr.py b/pypy/module/_ffi/interp_funcptr.py
--- a/pypy/module/_ffi/interp_funcptr.py
+++ b/pypy/module/_ffi/interp_funcptr.py
@@ -287,7 +287,11 @@
                                                                w_restype)
     addr = rffi.cast(rffi.VOIDP, addr)
     func = libffi.Func(name, argtypes, restype, addr, flags)
-    return W_FuncPtr(func, argtypes_w, w_restype)
+    try:
+        return W_FuncPtr(func, argtypes_w, w_restype)
+    except OSError:
+        raise OperationError(space.w_SystemError,
+                         space.wrap("internal error building the Func object"))
 
 
 W_FuncPtr.typedef = TypeDef(


More information about the pypy-commit mailing list