From 40f00122b811ca5c8788856f5baf4e5e088926eb Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 26 Jul 2017 14:38:49 -0400 Subject: 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. --- libqpdf/QPDF.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libqpdf/QPDF.cc') 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; } -- cgit v1.2.3-54-g00ecf