aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFXRefEntry.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-20 01:09:19 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-20 01:09:19 +0200
commit3f8c4c273649c857f5a607dcbb422729fce3a166 (patch)
tree9a71fbfc838cf876f7982f7213ad994c92c0a3fc /libqpdf/QPDFXRefEntry.cc
parentb67a3c15e768ed88ea3cdf7525c1ddc649aec2fe (diff)
downloadqpdf-3f8c4c273649c857f5a607dcbb422729fce3a166.tar.zst
categorize all error messages and include object information if available
git-svn-id: svn+q:///qpdf/trunk@829 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDFXRefEntry.cc')
-rw-r--r--libqpdf/QPDFXRefEntry.cc9
1 files changed, 5 insertions, 4 deletions
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;