mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-20 11:35:39 +02:00
Add fatalErrorEncountered method to Reporter/Listener interface
An empty default implementation is provided to keep backward compatibility. Called when signal or Structured Exception is encountered. Related to #1005
This commit is contained in:
@@ -209,6 +209,9 @@ namespace Catch {
|
||||
}
|
||||
|
||||
void RunContext::handleFatalErrorCondition(std::string const & message) {
|
||||
// First notify reporter that bad things happened
|
||||
m_reporter->fatalErrorEncountered(message);
|
||||
|
||||
// Don't rebuild the result -- the stringification itself can cause more fatal errors
|
||||
// Instead, fake a result data.
|
||||
AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } );
|
||||
|
Reference in New Issue
Block a user