diff --git a/internal/catch_capture.hpp b/internal/catch_capture.hpp index 1d36a21b..6763353a 100644 --- a/internal/catch_capture.hpp +++ b/internal/catch_capture.hpp @@ -729,6 +729,10 @@ inline bool isTrue expr; \ INTERNAL_CATCH_ACCEPT_EXPR( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ).setResultType( Catch::ResultWas::Ok ), stopOnFailure ); \ } \ + catch( std::exception& ex ) \ + { \ + INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ) << ex.what() ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure ); \ + } \ catch( ... ) \ { \ INTERNAL_CATCH_ACCEPT_EXPR( Catch::ResultBuilder( __FILE__, __LINE__, macroName, #expr ).setResultType( Catch::ResultWas::ThrewException ), stopOnFailure ); \