package dolmen_loop

  1. Overview
  2. Docs
type 'a t = 'a error

The type of errors, parameterized by their payload/parameters.

val code : _ t -> Code.t

Return the return code of an error.

val name : _ t -> string

Return the name/short description of an error.

val mnemonic : _ t -> string

Return the mnemonic of an error.

val print : Format.formatter -> ('a t * 'a) -> unit

Print an error.

val print_hints : Format.formatter -> ('a t * 'a) -> unit

Print an error's hints.

val print_doc : Format.formatter -> _ t -> unit

Print the (long) documentation for an error.

val user_interrupt : unit t

Error for a user interrupt.

val timeout : unit t

Error for timeouts.

val spaceout : unit t

Error for spaceouts.

val internal_error : (Format.formatter -> unit) t

Internal error, the param is a delayed printer (typically created using `Format.dprintf`).

val uncaught_exn : (exn * Printexc.raw_backtrace) t

Error for an uncaught exn (together with a backtrace).

val mk : ?code:Code.t -> mnemonic:string -> message:(Format.formatter -> 'a -> unit) -> ?hints:('a -> (Format.formatter -> unit) option) list -> name:string -> ?doc:(Format.formatter -> unit) -> unit -> 'a t

Create a new error.

OCaml

Innovation. Community. Security.