diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-11-28 14:34:33 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-02 09:37:25 +0200 |
commit | d8f6a06f0c1378b6489ab6c1c5c98337931ffdc2 (patch) | |
tree | 06885ccc5d1249e9ec59df52b155972bde92be82 /mod | |
parent | 14b1454dc9c507615663c6a9f6127a7557f15359 (diff) |
build_building(): handle all exceptions
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-ci-github.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 2c9034f..352ad5a 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -2099,6 +2099,7 @@ namespace brep build_building (const tenant_service& ts, const build& b, const diag_epilogue& log_writer) const noexcept + try { // NOTE: this function is noexcept and should not throw. @@ -2177,6 +2178,8 @@ namespace brep // if (iat != nullptr) { + // Let unlikely invalid_argument propagate. + // if (gq_update_check_run (error, *cr, iat->token, @@ -2242,6 +2245,16 @@ namespace brep return sd.json (); }; } + catch (const std::exception& e) + { + NOTIFICATION_DIAG (log_writer); + + string bid (gh_check_run_name (b)); // Full build id. + + error << "check run " << bid << ": unhandled exception: " << e.what(); + + return nullptr; + } function<optional<string> (const tenant_service&)> ci_github:: build_built (const tenant_service& ts, |