aboutsummaryrefslogtreecommitdiff
path: root/absl/base
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base')
-rw-r--r--absl/base/exception_safety_testing_test.cc2
-rw-r--r--absl/base/internal/exception_safety_testing.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/absl/base/exception_safety_testing_test.cc b/absl/base/exception_safety_testing_test.cc
index c2922f33..9141e39c 100644
--- a/absl/base/exception_safety_testing_test.cc
+++ b/absl/base/exception_safety_testing_test.cc
@@ -38,7 +38,7 @@ template <typename F>
void ExpectNoThrow(const F& f) {
try {
f();
- } catch (TestException e) {
+ } catch (const TestException& e) {
ADD_FAILURE() << "Unexpected exception thrown from " << e.what();
}
}
diff --git a/absl/base/internal/exception_safety_testing.h b/absl/base/internal/exception_safety_testing.h
index 8c2f5093..de4f0e28 100644
--- a/absl/base/internal/exception_safety_testing.h
+++ b/absl/base/internal/exception_safety_testing.h
@@ -858,7 +858,7 @@ testing::AssertionResult TestNothrowOp(const Operation& operation) {
try {
operation();
return testing::AssertionSuccess();
- } catch (exceptions_internal::TestException) {
+ } catch (const exceptions_internal::TestException&) {
return testing::AssertionFailure()
<< "TestException thrown during call to operation() when nothrow "
"guarantee was expected.";