diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-08-14 01:48:02 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-08-14 02:01:51 +0200 |
commit | b4bdc42b4fd627529e1c4a4636d1631254a2f26e (patch) | |
tree | 4a3526842ce36c08fef94ec7f60da585a505d6ce /libtests | |
parent | 164cbdde46d7ec6924782a60f346a6a465a79a26 (diff) | |
download | qpdf-b4bdc42b4fd627529e1c4a4636d1631254a2f26e.tar.zst |
New exception class QPDFSystemError (fixes #221)
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/qutil.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc index 78c52156..025f4e43 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -5,8 +5,10 @@ #include <fcntl.h> #include <qpdf/QUtil.hh> #include <qpdf/PointerHolder.hh> +#include <qpdf/QPDFSystemError.hh> #include <string.h> #include <limits.h> +#include <assert.h> #ifdef _WIN32 # include <io.h> @@ -137,9 +139,10 @@ void fopen_wrapper_test() std::cout << "after fopen" << std::endl; (void) fclose(f); } - catch (std::runtime_error& s) + catch (QPDFSystemError& s) { std::cout << "exception: " << s.what() << std::endl; + assert(s.getErrno() != 0); } } |