From a5d8783f6793de05381fe399d4d0025d480b2aa3 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 25 Jan 2013 11:08:50 -0500 Subject: Improve qpdf --check Fix exit status for case of errors without warnings, continue after errors when possible, add test case for parsing a file with content stream errors on some but not all pages. --- libqpdf/QPDFObjectHandle.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libqpdf') diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index fca8191d..1a7dfc73 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -1012,10 +1012,10 @@ QPDFObjectHandle::parseInternal(PointerHolder input, } else if (! object.isInitialized()) { - throw std::logic_error( - "INTERNAL ERROR: uninitialized object (token = " + - QUtil::int_to_string(token.getType()) + - ", " + token.getValue() + ")"); + throw QPDFExc(qpdf_e_damaged_pdf, input->getName(), + object_description, + input->getLastOffset(), + "parse error while reading object"); } else { -- cgit v1.2.3-54-g00ecf