aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2021-11-29 13:31:05 +0100
committerJay Berkenbilt <ejb@ql.org>2021-11-29 13:42:36 +0100
commit720ce9e8f333ba3911fa8003f08fd8813c19181a (patch)
tree158d7a6c4030f5b468c99f39b875cc1aaadd9c4c /libqpdf
parentac17308cf6cd6ea51cfbffdc898f0b67c89ae388 (diff)
downloadqpdf-720ce9e8f333ba3911fa8003f08fd8813c19181a.tar.zst
Improve testing and error handling around operating before processing
Diffstat (limited to 'libqpdf')
-rw-r--r--libqpdf/QPDF.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 4c9296ea..c81aede0 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -85,8 +85,10 @@ class InvalidInputSource: public InputSource
private:
void throwException()
{
- throw std::runtime_error(
- "QPDF operation attempted after closing input source");
+ throw std::logic_error(
+ "QPDF operation attempted on a QPDF object with no input source."
+ " QPDF operations are invalid before processFile (or another"
+ " process method) or after closeInputSource");
}
};