1. Python CFFI
  2. Untitled project
  3. cffi

Commits

Armin Rigo  committed 452b57d

Try to preserve the exact error message

  • Participants
  • Parent commits 5d2980c
  • Branches default

Comments (0)

Files changed (1)

File cffi/api.py

View file
  • Ignore whitespace
             BType = ffi._get_cached_btype(tp)
             try:
                 value = backendlib.load_function(BType, name)
-            except KeyError:
-                raise AttributeError(name)
+            except KeyError, e:
+                raise AttributeError('%s: %s' % (name, e))
             library.__dict__[name] = value
             return
         #