Displaying 2 results from an estimated 2 matches for "6dba97534".
2019 Jan 16
0
[PATCH 4/5] mltools: curl: turn Curl.run to raise exceptions
...t () =
+ let main_wrap () =
+ try main ()
+ with
+ | Curl.Curl_failed (code, url) ->
+ error (f_"curl error: failed to download ā%sā, error code %d") url code
+ in
+ run_main_and_handle_errors main_wrap
diff --git a/common/mltools/curl.ml b/common/mltools/curl.ml
index 6dba97534..eb32a4748 100644
--- a/common/mltools/curl.ml
+++ b/common/mltools/curl.ml
@@ -40,6 +40,8 @@ let args_of_proxy = function
| SystemProxy -> []
| ForcedProxy url -> [ "proxy", Some url; "noproxy", Some "" ]
+exception Curl_failed of (int * string) (* e...
2019 Jan 16
10
[PATCH 0/5] [RFC] builder: handle unavailable repos
In case a repository of virt-builder references files (e.g. the index)
that cannot be downloaded (network issues, 404, etc) then virt-builder
errors out on this situation. This is not a nice situation, from an user
POV.
This series does some refactoring to allow to better handle downloading
failures, and handle the failures gracefully in virt-builder.
RFC because I'm not yet too convinced