mirror of
https://github.com/zap-proto/ocaml-rpc.git
synced 2026-10-30 15:04:28 +00:00
Makes it match the new package names, and also will shrink the diff for the Eio port.
15 lines
283 B
OCaml
15 lines
283 B
OCaml
(** Errors returned by calls. *)
|
|
|
|
type t = [
|
|
| `Exception of Exception.t
|
|
| `Cancelled
|
|
]
|
|
|
|
let pp f = function
|
|
| `Exception ex -> Exception.pp f ex
|
|
| `Cancelled -> Fmt.pf f "cancelled"
|
|
|
|
let exn ?ty msg =
|
|
msg |> Fmt.kstr @@ fun reason ->
|
|
`Exception (Exception.v ?ty reason)
|