exceptions.py 623 B

123456789101112131415161718192021222324252627282930313233
  1. """
  2. Define exceptions specific to pdf2image
  3. """
  4. class PopplerNotInstalledError(Exception):
  5. """Raised when poppler is not installed"""
  6. pass
  7. class PDFInfoNotInstalledError(PopplerNotInstalledError):
  8. """Raised when pdfinfo is not installed"""
  9. pass
  10. class PDFPageCountError(Exception):
  11. """Raised when the pdfinfo was unable to retrieve the page count"""
  12. pass
  13. class PDFSyntaxError(Exception):
  14. """Raised when a syntax error was thrown during rendering"""
  15. pass
  16. class PDFPopplerTimeoutError(Exception):
  17. """Raised when the timeout is exceeded while converting a PDF"""
  18. pass