diff options
| author | Leitwolf | 2026-10-11 10:09:19 +0300 |
|---|---|---|
| committer | GitHub | 2026-10-11 10:09:19 +0300 |
| commit | ce6fa1996a8e358efdcff53a7628584077d9855c (patch) | |
| tree | d76f5945311828511e3ea55712487f21fbf8f70f /src/catch2/catch_session.cpp | |
| parent | 5633c5c98ec073ae938253bcfc72430d5d9aee89 (diff) | |
| parent | 1f78d8903c2fb18afea8c3055f8df83d8c60d9b5 (diff) | |
| download | catch3-ce6fa1996a8e358efdcff53a7628584077d9855c.tar.gz | |
Merge pull request #4 from Progmasoft/backport/upstream-3.16.1
Backport Catch2 3.16.1
Diffstat (limited to 'src/catch2/catch_session.cpp')
| -rw-r--r-- | src/catch2/catch_session.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp index 1c993ce1..34fd2809 100644 --- a/src/catch2/catch_session.cpp +++ b/src/catch2/catch_session.cpp @@ -458,7 +458,17 @@ namespace Catch { getCurrentMutableContext().setConfig(m_config.get()); // Create reporter(s) so we can route listings through them - auto reporter = prepareReporters(m_config.get()); + IEventListenerPtr reporter; + CATCH_TRY { + auto reporter_ = prepareReporters( m_config.get() ); + swap( reporter, reporter_ ); + } +#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) + catch ( std::exception& ex ) { + Catch::cerr() << "Error when creating reporter: " << ex.what() << '\n' << std::flush; + return ReporterConstructionErrorExitCode; + } +#endif auto const& invalidSpecs = m_config->testSpec().getInvalidSpecs(); if ( !invalidSpecs.empty() ) { |