aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Stream.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/QPDF_Stream.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/QPDF_Stream.cc')
-rw-r--r--libqpdf/QPDF_Stream.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc
index 6642a06e..d0dd2e5f 100644
--- a/libqpdf/QPDF_Stream.cc
+++ b/libqpdf/QPDF_Stream.cc
@@ -59,7 +59,7 @@ QPDF_Stream::getStreamData()
Pl_Buffer buf("stream data buffer");
if (! pipeStreamData(&buf, true, false, false))
{
- throw QPDFExc("getStreamData called on unfilterable stream");
+ throw std::logic_error("getStreamData called on unfilterable stream");
}
return buf.getBuffer();
}
@@ -208,8 +208,9 @@ QPDF_Stream::filterable(std::vector<std::string>& filters,
if (! filters_okay)
{
QTC::TC("qpdf", "QPDF_Stream invalid filter");
- throw QPDFExc(qpdf->getFilename(), this->offset,
- "invalid filter object type for this stream");
+ throw QPDFExc(qpdf_e_damaged_pdf, qpdf->getFilename(),
+ "", this->offset,
+ "stream filter type is not name or array");
}
// `filters' now contains a list of filters to be applied in