Move exception's translation into AssertionResultData message

This commit is contained in:
Martin Hořeňovský 2023-03-11 16:14:06 +01:00
parent 3220ae6d4a
commit 13fae1e2ff
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
3 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ namespace Catch {
AssertionReaction& reaction ) = 0;
virtual void handleUnexpectedInflightException
( AssertionInfo const& info,
std::string const& message,
std::string&& message,
AssertionReaction& reaction ) = 0;
virtual void handleIncomplete
( AssertionInfo const& info ) = 0;

View File

@ -619,13 +619,13 @@ namespace Catch {
void RunContext::handleUnexpectedInflightException(
AssertionInfo const& info,
std::string const& message,
std::string&& message,
AssertionReaction& reaction
) {
m_lastAssertionInfo = info;
AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) );
data.message = message;
data.message = CATCH_MOVE(message);
AssertionResult assertionResult{ info, CATCH_MOVE(data) };
assertionEnded( assertionResult );
populateReaction( reaction );

View File

@ -59,7 +59,7 @@ namespace Catch {
AssertionReaction& reaction ) override;
void handleUnexpectedInflightException
( AssertionInfo const& info,
std::string const& message,
std::string&& message,
AssertionReaction& reaction ) override;
void handleIncomplete
( AssertionInfo const& info ) override;