mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +00:00
Improved exception reporting
Refactored exception handling (handle more in the translator) and report exceptions in CHECKs
This commit is contained in:
parent
a57b025c9c
commit
333e6e6254
4 changed files with 106 additions and 48 deletions
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue