mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Improved exception reporting
Refactored exception handling (handle more in the translator) and report exceptions in CHECKs
This commit is contained in:
		@@ -32,7 +32,26 @@ namespace Catch
 | 
			
		||||
        ()
 | 
			
		||||
        const
 | 
			
		||||
        {
 | 
			
		||||
            return tryTranslators( m_translators.begin() );
 | 
			
		||||
            try
 | 
			
		||||
            {
 | 
			
		||||
                throw;
 | 
			
		||||
            }
 | 
			
		||||
            catch( std::exception& ex )
 | 
			
		||||
            {
 | 
			
		||||
                return ex.what();
 | 
			
		||||
            }
 | 
			
		||||
            catch( std::string& msg )
 | 
			
		||||
            {
 | 
			
		||||
                return msg;
 | 
			
		||||
            }
 | 
			
		||||
            catch( const char* msg )
 | 
			
		||||
            {
 | 
			
		||||
                return msg;
 | 
			
		||||
            }
 | 
			
		||||
            catch(...)
 | 
			
		||||
            {
 | 
			
		||||
                return tryTranslators( m_translators.begin() );
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        ///////////////////////////////////////////////////////////////////////
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user