diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-11-23 10:27:26 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-11-23 10:27:27 +0100 |
commit | 1585954515446b7044bf9eac46373e6c09fa7039 (patch) | |
tree | befdaeb04a789e1fac4f4207980b911181337f65 | |
parent | 6175d5d7d465e01253d43d4d792af988fee78d88 (diff) | |
download | sigc++-1585954515446b7044bf9eac46373e6c09fa7039.tar.gz |
tests: Catch exceptions by const ref.
Noticed by cppcheck.
-rw-r--r-- | tests/test_exception_catch.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_exception_catch.cc b/tests/test_exception_catch.cc index 51a9379..b9d1056 100644 --- a/tests/test_exception_catch.cc +++ b/tests/test_exception_catch.cc @@ -53,7 +53,7 @@ struct my_catch { throw; } - catch (std::range_error e) // catch what types we know + catch (const std::range_error& e) // catch what types we know { result_stream << "caught " << e.what(); } @@ -70,7 +70,7 @@ struct my_catch_void { throw; } - catch (std::range_error e) // catch what types we know + catch (const std::range_error& e) // catch what types we know { result_stream << "caught " << e.what(); } |