diff options
| author | Martin Hořeňovský | 2017-07-19 21:30:00 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-07-19 21:30:00 +0200 |
| commit | efd79aa0bdeb7d02be2d9b3db01685c7f0467568 (patch) | |
| tree | 3a407cacdd62a1c3866391c52c5f77c182d41c99 /include/internal | |
| parent | 4a1e898eaeab7910a872e3d1d1e26932bfaadcce (diff) | |
| download | catch3-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/internal')
| -rw-r--r-- | include/internal/catch_capture.hpp | 4 |
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( ... ) { \ |