Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/pdfplumber/utils/exceptions.py: 44%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

1class MalformedPDFException(Exception): 

2 pass 

3 

4 

5class PdfminerException(Exception): 

6 def __str__(self) -> str: 

7 msg = super().__str__() 

8 if not msg and self.args and isinstance(self.args[0], BaseException): 

9 # pdfminer.six raises some exceptions without a message (e.g. 

10 # PDFPasswordIncorrect), which would otherwise be surfaced here 

11 # as a blank error message. 

12 return type(self.args[0]).__name__ 

13 return msg