Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.31
-
None
-
None
-
None
Description
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.