Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/cffi/error.py: 58%

19 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-07 06:10 +0000

1 

2class FFIError(Exception): 

3 __module__ = 'cffi' 

4 

5class 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 

17class VerificationError(Exception): 

18 """ An error raised when verification fails 

19 """ 

20 __module__ = 'cffi' 

21 

22class 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 

28class PkgConfigError(Exception): 

29 """ An error raised for missing modules in pkg-config 

30 """ 

31 __module__ = 'cffi'