Aleksandr Beliakov created PDFBOX-5805:
------------------------------------------

             Summary: Replace IOException on PDF parsing
                 Key: PDFBOX-5805
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5805
             Project: PDFBox
          Issue Type: Improvement
    Affects Versions: 2.0.31
            Reporter: Aleksandr Beliakov


Classes like PDFParser, COSParser and other throw an IOException in case of an 
issue within PDF document structure. This makes it impossible to differentiate 
programmatically an IOException returned because of the file or InputStream 
reading issue (for instance a not accessible, corrupted input file/stream) 
against an exception returned because of an issue within PDF structure.

Would it be possible to introduce a new exception class (for instance, 
PDFParserException) and throw that exception in case of parsing-related issues? 
A new class (optionally) may extend IOException in order to provide a smooth 
migration for the end-user.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to