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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_session.cpp
diff options
context:
space:
mode:
authorLeitwolf112026-10-11 10:11:18 +0300
committerLeitwolf112026-10-11 10:11:18 +0300
commite7aa5ff697a27f140136d3643322301c3a811a69 (patch)
tree0fcdeeaa66b2eb69ca1b7e2bff08552be1d531d8 /src/catch2/catch_session.cpp
parentab1214937f57fb81a56e615a0aef8269ade5da91 (diff)
parentce6fa1996a8e358efdcff53a7628584077d9855c (diff)
downloadcatch3-e7aa5ff697a27f140136d3643322301c3a811a69.tar.gz
Merge devel into the platforms branch
devel gained the Catch2 3.16.1 backport, which dropped the retired macos-14 runner from the same line this branch changes. The macOS builds run on macos-15 and macos-26, as this branch has them. The upstream status names the platforms that are now the gate.
Diffstat (limited to 'src/catch2/catch_session.cpp')
-rw-r--r--src/catch2/catch_session.cpp12
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() ) {