package capnp-rpc

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file error.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(** 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)
OCaml

Innovation. Community. Security.