From 3f8c4c273649c857f5a607dcbb422729fce3a166 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 19 Oct 2009 23:09:19 +0000 Subject: categorize all error messages and include object information if available git-svn-id: svn+q:///qpdf/trunk@829 71b93d88-0707-0410-a8cf-f5a4172ac649 --- libqpdf/QPDFXRefEntry.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libqpdf/QPDFXRefEntry.cc') diff --git a/libqpdf/QPDFXRefEntry.cc b/libqpdf/QPDFXRefEntry.cc index b6d48d97..9a08c829 100644 --- a/libqpdf/QPDFXRefEntry.cc +++ b/libqpdf/QPDFXRefEntry.cc @@ -16,7 +16,8 @@ QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) : { if ((type < 1) || (type > 2)) { - throw QPDFExc("invalid xref type " + QUtil::int_to_string(type)); + throw std::logic_error( + "invalid xref type " + QUtil::int_to_string(type)); } } @@ -31,7 +32,7 @@ QPDFXRefEntry::getOffset() const { if (this->type != 1) { - throw QPDFExc( + throw std::logic_error( "getOffset called for xref entry of type != 1"); } return this->field1; @@ -42,7 +43,7 @@ QPDFXRefEntry::getObjStreamNumber() const { if (this->type != 2) { - throw QPDFExc( + throw std::logic_error( "getObjStreamNumber called for xref entry of type != 2"); } return this->field1; @@ -53,7 +54,7 @@ QPDFXRefEntry::getObjStreamIndex() const { if (this->type != 2) { - throw QPDFExc( + throw std::logic_error( "getObjStreamIndex called for xref entry of type != 2"); } return this->field2; -- cgit v1.2.3-54-g00ecf