Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-07-19 21:30:00 +0200
committerMartin Hořeňovský2017-07-19 21:30:00 +0200
commitefd79aa0bdeb7d02be2d9b3db01685c7f0467568 (patch)
tree3a407cacdd62a1c3866391c52c5f77c182d41c99 /include
parent4a1e898eaeab7910a872e3d1d1e26932bfaadcce (diff)
downloadcatch3-efd79aa0bdeb7d02be2d9b3db01685c7f0467568.tar.gz
Extend exception type in _THROWS_ with const& unconditionally
Potentially breaking change, but most people apparently were using it wrong and thus it won't be breaking for them. Closes #955
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_capture.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp
index 9a7714cc..1c862505 100644
--- a/include/internal/catch_capture.hpp
+++ b/include/internal/catch_capture.hpp
@@ -130,7 +130,7 @@
static_cast<void>(expr); \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
- catch( exceptionType ) { \
+ catch( exceptionType const& ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
@@ -194,7 +194,7 @@
static_cast<void>(expr); \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
- catch( exceptionType ex ) { \
+ catch( exceptionType const& ex ) { \
__catchResult.captureMatch( ex, matcher, #matcher ); \
} \
catch( ... ) { \