aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-gh.hxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-11-29 08:34:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-12-10 16:44:55 +0200
commitf5768fee9d0977a42f344cf0cfdae74ca80a23b9 (patch)
tree3ff334d7f9ae5d4b3396b9beb0644c052fd48a75 /mod/mod-ci-github-gh.hxx
parent0dd483c8d91fc895b1669389f453fb98f1c64bd3 (diff)
Review exceptions thrown by github-ci API functions
Diffstat (limited to 'mod/mod-ci-github-gh.hxx')
-rw-r--r--mod/mod-ci-github-gh.hxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx
index 6ede697..5fff2bc 100644
--- a/mod/mod-ci-github-gh.hxx
+++ b/mod/mod-ci-github-gh.hxx
@@ -107,7 +107,7 @@ namespace brep
// Return the GitHub check run status corresponding to a build_state.
//
string
- gh_to_status (build_state st);
+ gh_to_status (build_state st) noexcept;
// Return the build_state corresponding to a GitHub check run status
// string. Throw invalid_argument if the passed status was invalid.
@@ -118,6 +118,9 @@ namespace brep
// If warning_success is true, then map result_status::warning to SUCCESS
// and to FAILURE otherwise.
//
+ // Throw invalid_argument in case of unsupported result_status value
+ // (currently skip, interrupt).
+ //
string
gh_to_conclusion (result_status, bool warning_success);
@@ -211,9 +214,13 @@ namespace brep
gh_installation_access_token () = default;
};
+ // Throw runtime_error if the conversion fails.
+ //
string
gh_to_iso8601 (timestamp);
+ // Throw invalid_argument if the conversion fails.
+ //
timestamp
gh_from_iso8601 (const string&);