From b4bdc42b4fd627529e1c4a4636d1631254a2f26e Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 13 Aug 2018 19:48:02 -0400 Subject: New exception class QPDFSystemError (fixes #221) --- libtests/qutil.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libtests/qutil.cc') 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 #include #include +#include #include #include +#include #ifdef _WIN32 # include @@ -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); } } -- cgit v1.2.3-70-g09d2