module Error: Errortype t
include Sexpable.S
include Binable.S
val to_sexp_hum : t -> Sexplib.Sexp.tto_sexp_hum t returns t formatted as sexp that aims to be readable. This loses
information about the structure of the error, so if the result is converted back using
t_of_sexp, it will not be able to pretty print as nicely. That is, the following
equalities do not necessarily hold:
to_sexp_hum (t_of_sexp (to_sexp_hum t)) = to_sexp_hum t
to_string_hum (t_of_sexp (to_sexp_hum t)) = to_string_hum t
val to_string_hum : t -> stringval of_string : string -> tval of_lazy : string Lazy.t -> tval of_thunk : (unit -> string) -> tval create : string -> 'a -> ('a -> Sexplib.Sexp.t) -> tcreate msg z sexp_of_z, be careful to use only immutable values for z, or be
aware that z will be lazily converted to a sexp at a later point in time, which will
pick up the then-current state of z.val tag : t -> string -> tval tag_arg : t -> string -> 'a -> ('a -> Sexplib.Sexp.t) -> tval of_list : ?trunc_after:int -> t list -> tval of_exn : ?backtrace:[ `Get | `This of string ] -> exn -> tval to_exn : t -> exnval raise : t -> 'aval failwiths : string -> 'a -> ('a -> Sexplib.Sexp.t) -> 'bfailwiths message value sexp_of_value raises an exception with the supplied
message and value, by constructing an Error.t and using Error.raise. As
usual, the sexp_of_value is only applied when the value is converted to a sexp or a
string. So, if you mutate value in between the time you call failwiths and the
time the error is displayed, those mutations will be reflected in the error message.
failwiths s a f = Error.raise (Error.create s a f)
val pp : Format.formatter -> t -> unit