Jsont.Error
Encoding, decoding and query errors.
val to_string : t -> string
error_to_string e
formats e
using pp_error
to a string.
make_msg ctx m msg
is an error with message msg
for meta m
in context ctx
.
error ctx m msg
raises an error with message msg
for meta m
in context ctx
.
fmt
is like msg
but formats an error message.
sort p m ~exp ~fnd
errors when sort exp
was expected but fnd
was found. See also Jsont.Repr.type_error
error_kind p m ~exp ~fnd
errors when kind exp
was expected but sort fnd
was found. See also Jsont.Repr.type_error
.
miss_mem ctx m ~exp ~fnd
errors when a member named exp
was expected in an object of kind obj_kind
, but the object had only fnd
names (leave empty if the info is no longer available).
unexpected_mems ctx m ~obj_kind ~mems
errors when an object of kind obj_kind
has the mems
unexpected member names.