Replace most naked throws with macros from catch_enforce.h

This is a first step towards support a no-exceptions mode
This commit is contained in:
Martin Hořeňovský
2018-09-03 10:03:47 +02:00
parent ef9150fe6f
commit 86da2846af
7 changed files with 28 additions and 34 deletions

View File

@@ -97,12 +97,12 @@ namespace Catch {
case ResultWas::Ok:
case ResultWas::Info:
case ResultWas::Warning:
throw std::domain_error( "Internal error in TeamCity reporter" );
CATCH_ERROR( "Internal error in TeamCity reporter" );
// These cases are here to prevent compiler warnings
case ResultWas::Unknown:
case ResultWas::FailureBit:
case ResultWas::Exception:
throw std::domain_error( "Not implemented" );
CATCH_ERROR( "Not implemented" );
}
if( assertionStats.infoMessages.size() == 1 )
msg << " with message:";