aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/qutil.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-08-14 01:48:02 +0200
committerJay Berkenbilt <ejb@ql.org>2018-08-14 02:01:51 +0200
commitb4bdc42b4fd627529e1c4a4636d1631254a2f26e (patch)
tree4a3526842ce36c08fef94ec7f60da585a505d6ce /libtests/qutil.cc
parent164cbdde46d7ec6924782a60f346a6a465a79a26 (diff)
downloadqpdf-b4bdc42b4fd627529e1c4a4636d1631254a2f26e.tar.zst
New exception class QPDFSystemError (fixes #221)
Diffstat (limited to 'libtests/qutil.cc')
-rw-r--r--libtests/qutil.cc5
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);
}
}