diff options
| author | Martin Hořeňovský | 2017-09-14 19:57:59 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-09-14 19:57:59 +0200 |
| commit | 4e852672033ac989e303a4a00de607738e64e7e5 (patch) | |
| tree | 9c3947fa71243d72122c85e0df9243a5f64bdf99 /include/internal/catch_run_context.cpp | |
| parent | eaf850cd0c2c3322a1dddb9a2e37210db3f15df4 (diff) | |
| download | catch3-4e852672033ac989e303a4a00de607738e64e7e5.tar.gz | |
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
Diffstat (limited to 'include/internal/catch_run_context.cpp')
| -rw-r--r-- | include/internal/catch_run_context.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/internal/catch_run_context.cpp b/include/internal/catch_run_context.cpp index 60f133a0..b034ec62 100644 --- a/include/internal/catch_run_context.cpp +++ b/include/internal/catch_run_context.cpp @@ -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 } ); |