Jsont.ErrorEncoding, decoding and query errors.
val kind_to_string : kind -> stringkind_to_string kind is kind as a string.
module Context : sig ... endJSON error contexts.
The type for errors. The context, the error localisation and the kind of error.
make_msg ctx meta msg is an error with message msg for meta meta in context ctx.
val msg : Meta.t -> string -> 'amsg meta msg raises an error with message msg for meta meta in an empty context.
val msgf :
Meta.t ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 ->
'amsgf meta fmt … is like msg but formats an error message.
val expected : Meta.t -> string -> fnd:string -> 'aexpected meta fmt exp ~fnd is msgf "Expected %s but found %s" exp fnd.
push_array kinded_sort n e contextualises e as an error in the nth element of an array of kinded sort kinded_sort.
push_object kinded_sort n e contextualises e as an error in the member n of an object of kinded sort kinded_sort.
val adjust_context :
first_byte:Textloc.byte_pos ->
first_line:Textloc.line_pos ->
t ->
'aadjust_context ~first_byte ~first_line adjusts the error's context's meta to encompass the given positions.
val puterr : unit fmtputerr formats Error: in red.