diff options
author | Jay Berkenbilt <ejb@ql.org> | 2009-10-20 02:24:44 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2009-10-20 02:24:44 +0200 |
commit | 398354b6f0c5e8311496481c2b80c1eb4bec4424 (patch) | |
tree | 538fe208893671fd7c10e24c7b79549b972ab18f /libqpdf/QPDF.cc | |
parent | 3f8c4c273649c857f5a607dcbb422729fce3a166 (diff) | |
download | qpdf-398354b6f0c5e8311496481c2b80c1eb4bec4424.tar.zst |
update C API for error retrieval
git-svn-id: svn+q:///qpdf/trunk@830 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r-- | libqpdf/QPDF.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index ebd78a9d..778091bd 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -300,10 +300,10 @@ QPDF::setAttemptRecovery(bool val) this->attempt_recovery = val; } -std::vector<std::string> +std::vector<QPDFExc> QPDF::getWarnings() { - std::vector<std::string> result = this->warnings; + std::vector<QPDFExc> result = this->warnings; this->warnings.clear(); return result; } @@ -397,10 +397,10 @@ QPDF::parse() void QPDF::warn(QPDFExc const& e) { - this->warnings.push_back(e.what()); + this->warnings.push_back(e); if (! this->suppress_warnings) { - std::cerr << "WARNING: " << this->warnings.back() << std::endl; + std::cerr << "WARNING: " << this->warnings.back().what() << std::endl; } } @@ -424,7 +424,7 @@ QPDF::reconstruct_xref(QPDFExc& e) warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0, "file is damaged")); warn(e); - warn(QPDFExc(qpdf_e_damaged_pdf, "", "", 0, + warn(QPDFExc(qpdf_e_damaged_pdf, this->file.getName(), "", 0, "Attempting to reconstruct cross-reference table")); // Delete all references to type 1 (uncompressed) objects |