mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +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
|
@ -391,7 +391,7 @@ namespace Catch
|
|||
|
||||
m_reporter->EndTestCase( testInfo, m_successes - prevSuccessCount, m_failures - prevFailureCount, redirectedCout, redirectedCerr );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
virtual std::size_t getSuccessCount
|
||||
()
|
||||
|
@ -601,21 +601,6 @@ namespace Catch
|
|||
{
|
||||
// This just means the test was aborted due to failure
|
||||
}
|
||||
catch( std::exception& ex )
|
||||
{
|
||||
acceptMessage( ex.what() );
|
||||
acceptResult( ResultWas::ThrewException );
|
||||
}
|
||||
catch( std::string& msg )
|
||||
{
|
||||
acceptMessage( msg );
|
||||
acceptResult( ResultWas::ThrewException );
|
||||
}
|
||||
catch( const char* msg )
|
||||
{
|
||||
acceptMessage( msg );
|
||||
acceptResult( ResultWas::ThrewException );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
acceptMessage( Catch::Hub::getExceptionTranslatorRegistry().translateActiveException() );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue