aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-05-11 10:47:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2018-05-11 10:47:42 +0000
commitfa5d559d9dafe248712bd98e6cfcbb91b2b20f59 (patch)
treeecfb8eff345a429f3e26636ece27e7e4497db86a /vespalib
parent0cd7118098ced103d3121713bf373099c4174ca6 (diff)
Catch by reference
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/exception_classes/exception_classes_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/vespalib/src/tests/exception_classes/exception_classes_test.cpp b/vespalib/src/tests/exception_classes/exception_classes_test.cpp
index cbbdf83e777..c718987aae9 100644
--- a/vespalib/src/tests/exception_classes/exception_classes_test.cpp
+++ b/vespalib/src/tests/exception_classes/exception_classes_test.cpp
@@ -10,7 +10,7 @@ TEST("require that PortListenException retains relevant information") {
try {
error.throwSelf();
ASSERT_TRUE(false);
- } catch(PortListenException e) {
+ } catch(PortListenException & e) {
fprintf(stderr, "what: %s\n", e.what());
EXPECT_EQUAL(80, e.get_port());
EXPECT_EQUAL("HTTP", e.get_protocol());
@@ -24,7 +24,7 @@ TEST("require that PortListenException with cause retains relevant information")
try {
error.throwSelf();
ASSERT_TRUE(false);
- } catch(PortListenException e) {
+ } catch(PortListenException & e) {
fprintf(stderr, "what: %s\n", e.what());
EXPECT_EQUAL(1337, e.get_port());
EXPECT_EQUAL("RPC", e.get_protocol());