diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-01-25 17:08:50 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-01-25 17:08:50 +0100 |
commit | a5d8783f6793de05381fe399d4d0025d480b2aa3 (patch) | |
tree | ce5ec2723b60569785f79a8fb54edc59b060f9a5 /libqpdf/QPDFObjectHandle.cc | |
parent | a7e8b8c789ae43976cab5356a586183ae123a14d (diff) | |
download | qpdf-a5d8783f6793de05381fe399d4d0025d480b2aa3.tar.zst |
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.
Diffstat (limited to 'libqpdf/QPDFObjectHandle.cc')
-rw-r--r-- | libqpdf/QPDFObjectHandle.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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<InputSource> 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 { |