From d0e99f195a987c483bbb6c5449cf39bee34e08a1 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 16 Feb 2018 17:25:27 -0500 Subject: More robust handling of type errors Give objects descriptions and context so it is possible to issue warnings instead of fatal errors for attempts to access objects of the wrong type. --- libqpdf/QPDF_Array.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libqpdf/QPDF_Array.cc') diff --git a/libqpdf/QPDF_Array.cc b/libqpdf/QPDF_Array.cc index c526174f..1a4ba61d 100644 --- a/libqpdf/QPDF_Array.cc +++ b/libqpdf/QPDF_Array.cc @@ -1,4 +1,5 @@ #include +#include #include QPDF_Array::QPDF_Array(std::vector const& items) : @@ -46,6 +47,12 @@ QPDF_Array::getTypeName() const return "array"; } +void +QPDF_Array::setDescription(QPDF* qpdf, std::string const& description) +{ + this->QPDFObject::setDescription(qpdf, description); +} + int QPDF_Array::getNItems() const { -- cgit v1.2.3-70-g09d2