aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_linearization.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-09-26 20:36:04 +0200
committerJay Berkenbilt <ejb@ql.org>2009-09-26 20:36:04 +0200
commitf3d7c26de1f575a14017a161ad1fdd2b93385e03 (patch)
tree065d6b0e12534a7371974bfb17e77c91d7b217d6 /libqpdf/QPDF_linearization.cc
parent64546cfa0ddc2cf4c91e0865e979947c6b20ca46 (diff)
downloadqpdf-f3d7c26de1f575a14017a161ad1fdd2b93385e03.tar.zst
removed qexc; non-compatible ABI change
git-svn-id: svn+q:///qpdf/trunk@709 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDF_linearization.cc')
-rw-r--r--libqpdf/QPDF_linearization.cc37
1 files changed, 22 insertions, 15 deletions
diff --git a/libqpdf/QPDF_linearization.cc b/libqpdf/QPDF_linearization.cc
index 281748b5..a6b1c2d0 100644
--- a/libqpdf/QPDF_linearization.cc
+++ b/libqpdf/QPDF_linearization.cc
@@ -1177,8 +1177,9 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
{
// Note that we can't call optimize here because we don't know
// whether it should be called with or without allow changes.
- throw QEXC::Internal("QPDF::calculateLinearizationData "
- "called before optimize()");
+ throw std::logic_error(
+ "INTERNAL ERROR: QPDF::calculateLinearizationData "
+ "called before optimize()");
}
// Separate objects into the categories sufficient for us to
@@ -1336,8 +1337,9 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
break;
case ObjUser::ou_bad:
- throw QEXC::Internal("QPDF::calculateLinearizationData: "
- "invalid user type");
+ throw std::logic_error(
+ "INTERNAL ERROR: QPDF::calculateLinearizationData: "
+ "invalid user type");
break;
}
}
@@ -1444,8 +1446,9 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
ObjGen first_page_og(pages[0].getObjectID(), pages[0].getGeneration());
if (! lc_first_page_private.count(first_page_og))
{
- throw QEXC::Internal("QPDF::calculateLinearizationData: first page "
- "object not in lc_first_page_private");
+ throw std::logic_error(
+ "INTERNAL ERROR: QPDF::calculateLinearizationData: first page "
+ "object not in lc_first_page_private");
}
lc_first_page_private.erase(first_page_og);
this->c_linp.first_page_object = pages[0].getObjectID();
@@ -1492,7 +1495,8 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
ObjGen page_og(pages[i].getObjectID(), pages[i].getGeneration());
if (! lc_other_page_private.count(page_og))
{
- throw QEXC::Internal(
+ throw std::logic_error(
+ "INTERNAL ERROR: "
"QPDF::calculateLinearizationData: page object for page " +
QUtil::int_to_string(i) + " not in lc_other_page_private");
}
@@ -1522,8 +1526,9 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
// That should have covered all part7 objects.
if (! lc_other_page_private.empty())
{
- throw QEXC::Internal(
- "QPDF::calculateLinearizationData: lc_other_page_private is "
+ throw std::logic_error(
+ "INTERNAL ERROR:"
+ " QPDF::calculateLinearizationData: lc_other_page_private is "
"not empty after generation of part7");
}
@@ -1601,7 +1606,8 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
}
if (! lc_thumbnail_private.empty())
{
- throw QEXC::Internal(
+ throw std::logic_error(
+ "INTERNAL ERROR: "
"QPDF::calculateLinearizationData: lc_thumbnail_private "
"not empty after placing thumbnails");
}
@@ -1633,11 +1639,12 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
unsigned int num_wanted = this->object_to_obj_users.size();
if (num_placed != num_wanted)
{
- throw QEXC::Internal("QPDF::calculateLinearizationData: wrong "
- "number of objects placed (num_placed = " +
- QUtil::int_to_string(num_placed) +
- "; number of objects: " +
- QUtil::int_to_string(num_wanted));
+ throw std::logic_error(
+ "INTERNAL ERROR: QPDF::calculateLinearizationData: wrong "
+ "number of objects placed (num_placed = " +
+ QUtil::int_to_string(num_placed) +
+ "; number of objects: " +
+ QUtil::int_to_string(num_wanted));
}
// Calculate shared object hint table information including