Module Toml.Error

Decoding errors.

type kind

The type for kinds of decoding errors.

val pp_kind : unit -> kind fmt

pp_error_kind () formats an error kind.

The type for decoding errors. The error kind and its location in text.

val pp : ?pp_loc:Serialkit_text.Tloc.t fmt -> ?pp_kind:kind fmt -> ?pp_prefix:unit fmt -> unit -> t fmt

pp_error ~pp_loc ~pp_error_kind ~pp_prefix () formats errors using pp_loc (defaults to pp_loc), pp_error_kind (defaults to pp_error_kind) and pp_prefix (defaults formats "Error: ").

val to_string : ?pp:t fmt -> ('a, t) Stdlib.result -> ('a, string) Stdlib.result

error_to_string ~pp r converts an error to a string using pp (defaults to pp).