| 1 |
|
| 2 |
class FFIError(Exception): |
| 3 |
__module__ = 'cffi' |
| 4 |
|
| 5 |
class CDefError(Exception): |
| 6 |
__module__ = 'cffi' |
| 7 |
def __str__(self): |
| 8 |
try: |
| 9 |
current_decl = self.args[1] |
| 10 |
filename = current_decl.coord.file |
| 11 |
linenum = current_decl.coord.line |
| 12 |
prefix = '%s:%d: ' % (filename, linenum) |
| 13 |
except (AttributeError, TypeError, IndexError): |
| 14 |
prefix = '' |
| 15 |
return '%s%s' % (prefix, self.args[0]) |
| 16 |
|
| 17 |
class VerificationError(Exception): |
| 18 |
""" An error raised when verification fails |
| 19 |
""" |
| 20 |
__module__ = 'cffi' |
| 21 |
|
| 22 |
class VerificationMissing(Exception): |
| 23 |
""" An error raised when incomplete structures are passed into |
| 24 |
cdef, but no verification has been done |
| 25 |
""" |
| 26 |
__module__ = 'cffi' |
| 27 |
|
| 28 |
class PkgConfigError(Exception): |
| 29 |
""" An error raised for missing modules in pkg-config |
| 30 |
""" |
| 31 |
__module__ = 'cffi' |