mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	FatalErrorConditions now full close reporter states
- so the console reporter(s) show final summary and the xml reporters close their tags
This commit is contained in:
		@@ -16,11 +16,8 @@ namespace Catch {
 | 
			
		||||
    inline void fatal( std::string const& message, int exitCode ) {
 | 
			
		||||
        IContext& context = Catch::getCurrentContext();
 | 
			
		||||
        IResultCapture* resultCapture = context.getResultCapture();
 | 
			
		||||
        ResultBuilder resultBuilder = resultCapture->makeUnexpectedResultBuilder();
 | 
			
		||||
        resultBuilder.setResultType( ResultWas::FatalErrorCondition );
 | 
			
		||||
        resultBuilder << message;
 | 
			
		||||
        resultBuilder.captureExpression();
 | 
			
		||||
        
 | 
			
		||||
        resultCapture->handleFatalErrorCondition( message );
 | 
			
		||||
 | 
			
		||||
		if( Catch::alwaysTrue() ) // avoids "no return" warnings
 | 
			
		||||
            exit( exitCode );
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user