You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

error.py 877B

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