mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-20 11:35:39 +02:00
Added CATCH_ENFORCE (and updated CATCH_INTERNAL_ERROR to be stream based)
replaced all ad-hoc exceptions (where appropriate) with CATCH_ENFORCE or CATCH_INTERNAL_ERROR - no explicit ostringstreams.
This commit is contained in:
@@ -202,11 +202,6 @@ namespace TestCaseTracking {
|
||||
m_ctx.currentTracker().close();
|
||||
|
||||
switch( m_runState ) {
|
||||
case NotStarted:
|
||||
case CompletedSuccessfully:
|
||||
case Failed:
|
||||
throw std::logic_error( "Illogical state" );
|
||||
|
||||
case NeedsAnotherRun:
|
||||
break;;
|
||||
|
||||
@@ -218,8 +213,13 @@ namespace TestCaseTracking {
|
||||
m_runState = CompletedSuccessfully;
|
||||
break;
|
||||
|
||||
case NotStarted:
|
||||
case CompletedSuccessfully:
|
||||
case Failed:
|
||||
CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState );
|
||||
|
||||
default:
|
||||
throw std::logic_error( "Unexpected state" );
|
||||
CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState );
|
||||
}
|
||||
moveToParent();
|
||||
m_ctx.completeCycle();
|
||||
|
Reference in New Issue
Block a user