mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-03 10:43:28 +01:00
Hold translated exception in local string while matching
This commit is contained in:
parent
ee75b324e7
commit
0545de0a31
@ -16,7 +16,8 @@ namespace Catch {
|
|||||||
// There is another overload, in catch_assertinhandler.h/.cpp, that only takes a string and infers
|
// There is another overload, in catch_assertinhandler.h/.cpp, that only takes a string and infers
|
||||||
// the Equals matcher (so the header does not mention matchers)
|
// the Equals matcher (so the header does not mention matchers)
|
||||||
void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) {
|
void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) {
|
||||||
MatchExpr<std::string, StringMatcher const&> expr( Catch::translateActiveException(), matcher, matcherString );
|
std::string exceptionMessage = Catch::translateActiveException();
|
||||||
|
MatchExpr<std::string, StringMatcher const&> expr( exceptionMessage, matcher, matcherString );
|
||||||
handler.handle( expr );
|
handler.handle( expr );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user