summaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-01-25 17:08:50 +0100
committerJay Berkenbilt <ejb@ql.org>2013-01-25 17:08:50 +0100
commita5d8783f6793de05381fe399d4d0025d480b2aa3 (patch)
treece5ec2723b60569785f79a8fb54edc59b060f9a5 /libqpdf
parenta7e8b8c789ae43976cab5356a586183ae123a14d (diff)
downloadqpdf-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')
-rw-r--r--libqpdf/QPDFObjectHandle.cc8
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
{