This commit is contained in:
swrup 2026-03-03 10:48:14 +01:00
parent 21e6a47007
commit a09ba1d7f1
7 changed files with 35 additions and 37 deletions

View file

@ -5,7 +5,7 @@ let ( let+ ) o f = match o with Ok v -> Ok (f v) | Error _ as e -> e
use polymorphic variant for errors
use GANA error codes:
https://git.gnunet.org/gana.git/tree/gnu-taler-error-codes/registry.rec *)
let unwrap_err_msg o = match o with Error (`Msg e) -> Error e | Ok v -> Ok v
let unwrap_msg o = match o with Error (`Msg e) -> Error e | Ok v -> Ok v
let unwrap_err_caqti o =
match o with Error err -> Fmt.error "%a" Caqti_error.pp err | Ok v -> Ok v