Use Lwt.reraise instead of Lwt.fail
This commit is contained in:
parent
32ea8d2224
commit
71a5b0da96
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ let read_file datadir filepath =
|
||||||
Log.warn (fun m -> m "Error reading local file %a: %s"
|
Log.warn (fun m -> m "Error reading local file %a: %s"
|
||||||
Fpath.pp filepath (Unix.error_message e));
|
Fpath.pp filepath (Unix.error_message e));
|
||||||
Lwt.return_error (`File_error filepath)
|
Lwt.return_error (`File_error filepath)
|
||||||
| e -> Lwt.fail e)
|
| e -> Lwt.reraise e)
|
||||||
|
|
||||||
let build_artifact build filepath (module Db : CONN) =
|
let build_artifact build filepath (module Db : CONN) =
|
||||||
Db.find_opt Builder_db.Build_artifact.get_by_build_uuid (build, filepath)
|
Db.find_opt Builder_db.Build_artifact.get_by_build_uuid (build, filepath)
|
||||||
|
@ -215,7 +215,7 @@ let save path data =
|
||||||
(function
|
(function
|
||||||
| Unix.Unix_error (e, _, _) ->
|
| Unix.Unix_error (e, _, _) ->
|
||||||
Lwt_result.fail (`Msg (Unix.error_message e))
|
Lwt_result.fail (`Msg (Unix.error_message e))
|
||||||
| e -> Lwt.fail e)
|
| e -> Lwt.reraise e)
|
||||||
|
|
||||||
let save_artifacts staging artifacts =
|
let save_artifacts staging artifacts =
|
||||||
List.fold_left
|
List.fold_left
|
||||||
|
|
Loading…
Reference in a new issue