diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-11-29 13:31:05 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-11-29 13:42:36 +0100 |
commit | 720ce9e8f333ba3911fa8003f08fd8813c19181a (patch) | |
tree | 158d7a6c4030f5b468c99f39b875cc1aaadd9c4c /libqpdf/QPDF.cc | |
parent | ac17308cf6cd6ea51cfbffdc898f0b67c89ae388 (diff) | |
download | qpdf-720ce9e8f333ba3911fa8003f08fd8813c19181a.tar.zst |
Improve testing and error handling around operating before processing
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r-- | libqpdf/QPDF.cc | 6 |
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"); } }; |