diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-08-13 03:57:52 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-08-13 03:57:52 +0200 |
commit | a2f62935b35aebe68a5a2f7e729ae4bb8734cfc7 (patch) | |
tree | 9bcb9a5e4c8b116ffa81e3b942a0ee472ab6b3c6 /libtests | |
parent | 3d6615b2764da759c5b9354c40cd1a32b84ee039 (diff) | |
download | qpdf-a2f62935b35aebe68a5a2f7e729ae4bb8734cfc7.tar.zst |
Catch exceptions as const references (fixes #236)
This fix allows qpdf to compile/test cleanly with gcc 8.
Diffstat (limited to 'libtests')
-rw-r--r-- | libtests/qutil.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtests/qutil.cc b/libtests/qutil.cc index a7479fb5..78c52156 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -26,7 +26,7 @@ void test_to_number(char const* str, int_T wanted, bool error, result = fn(str); worked = (wanted == result); } - catch (std::runtime_error) + catch (std::runtime_error const&) { threw = true; } @@ -247,7 +247,7 @@ void same_file_test() fclose(QUtil::safe_fopen("qutil.out", "r")); fclose(QUtil::safe_fopen("other-file", "r")); } - catch (std::exception) + catch (std::exception const&) { std::cout << "same_file_test expects to have qutil.out and other-file" " exist in the current directory\n"; |