From fa5d559d9dafe248712bd98e6cfcbb91b2b20f59 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Fri, 11 May 2018 10:47:42 +0000 Subject: Catch by reference --- vespalib/src/tests/exception_classes/exception_classes_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vespalib/src/tests/exception_classes') 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()); -- cgit v1.2.3