From 14b1454dc9c507615663c6a9f6127a7557f15359 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Thu, 28 Nov 2024 11:41:04 +0200 Subject: build_queued(): handle all exceptions --- mod/mod-ci-github.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mod/mod-ci-github.cxx') diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index ef72fc9..2c9034f 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -1918,6 +1918,7 @@ namespace brep optional istate, const build_queued_hints& hs, const diag_epilogue& log_writer) const noexcept + try { // NOTE: this function is noexcept and should not throw. @@ -2020,6 +2021,8 @@ namespace brep { // Create a check_run for each build as a single request. // + // Let unlikely invalid_argument propagate. + // if (gq_create_check_runs (error, crs, iat->token, @@ -2083,6 +2086,14 @@ namespace brep return sd.json (); }; } + catch (const std::exception& e) + { + NOTIFICATION_DIAG (log_writer); + + error << "CI tenant " << ts.id << ": unhandled exception: " << e.what (); + + return nullptr; + } function (const tenant_service&)> ci_github:: build_building (const tenant_service& ts, -- cgit v1.1