From efd79aa0bdeb7d02be2d9b3db01685c7f0467568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 19 Jul 2017 21:30:00 +0200 Subject: [PATCH] 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 --- include/internal/catch_capture.hpp | 4 ++-- 1 file 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(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ - catch( exceptionType ) { \ + catch( exceptionType const& ) { \ __catchResult.captureResult( Catch::ResultWas::Ok ); \ } \ catch( ... ) { \ @@ -194,7 +194,7 @@ static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ - catch( exceptionType ex ) { \ + catch( exceptionType const& ex ) { \ __catchResult.captureMatch( ex, matcher, #matcher ); \ } \ catch( ... ) { \