Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_run_context.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-09-14 19:57:59 +0200
committerMartin Hořeňovský2017-09-14 19:57:59 +0200
commit4e852672033ac989e303a4a00de607738e64e7e5 (patch)
tree9c3947fa71243d72122c85e0df9243a5f64bdf99 /include/internal/catch_run_context.cpp
parenteaf850cd0c2c3322a1dddb9a2e37210db3f15df4 (diff)
downloadcatch3-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.cpp3
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 } );