Skip to content

Commit 1e34212

Browse files
committed
Fix gcc-8 catch-value warnings
warning: catching polymorphic type 'class std::exception' by value [-Wcatch-value=] warning: catching polymorphic type 'class std::logic_error' by value [-Wcatch-value=]
1 parent 1e95202 commit 1e34212

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test-catch.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ context("Exception handling") {
5353
test_that("we can use Catch to test for exceptions") {
5454

5555
expect_error(ouch());
56-
expect_error_as(ouch(), std::exception);
57-
expect_error_as(ouch(), std::logic_error);
56+
expect_error_as(ouch(), std::exception&);
57+
expect_error_as(ouch(), std::logic_error&);
5858

5959
}
6060
}

0 commit comments

Comments
 (0)