diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-11-28 11:41:04 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-02 09:37:25 +0200 |
commit | 14b1454dc9c507615663c6a9f6127a7557f15359 (patch) | |
tree | 458a06978f33a9cc9c2495567641f4629b86fd41 | |
parent | 26c7dbcbda7f4b89e5f1dd135343c721642bed3d (diff) |
build_queued(): handle all exceptions
-rw-r--r-- | mod/mod-ci-github.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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<build_state> 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<optional<string> (const tenant_service&)> ci_github:: build_building (const tenant_service& ts, |