diff options
author | Jay Berkenbilt <ejb@ql.org> | 2017-07-26 20:38:49 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2017-07-28 00:20:31 +0200 |
commit | 40f00122b811ca5c8788856f5baf4e5e088926eb (patch) | |
tree | 3a8247e134b7624932cd5d1b29110eda39664d5a /libqpdf/QPDF.cc | |
parent | dd8dad74f47b6068281dd605a04bc2d0b6283423 (diff) | |
download | qpdf-40f00122b811ca5c8788856f5baf4e5e088926eb.tar.zst |
Convert object parsing errors to warnings
QPDFObjectHandle::parseInternal now issues warnings instead of
throwing exceptions for all error conditions that it finds (except
internal logic errors) and has stronger recovery for things like
invalid tokens and malformed dictionaries. This should improve qpdf's
ability to recover from a wide range of broken files that currently
cause it to fail.
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r-- | libqpdf/QPDF.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index ecc13491..087013d7 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -334,8 +334,9 @@ QPDF::reconstruct_xref(QPDFExc& e) { if (this->reconstructed_xref) { - // Avoid xref reconstruction infinite loops - QTC::TC("qpdf", "QPDF caught recursive xref reconstruction"); + // Avoid xref reconstruction infinite loops. This is getting + // very hard to reproduce because qpdf is throwing many fewer + // exceptions while parsing. Most situations are warnings now. throw e; } |