Improved exception reporting

Refactored exception handling (handle more in the translator)
and report exceptions in CHECKs
This commit is contained in:
Phil Nash 2012-02-17 19:50:59 +00:00
parent a57b025c9c
commit 333e6e6254
4 changed files with 106 additions and 48 deletions

View file

@ -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() );
}
}
///////////////////////////////////////////////////////////////////////