package ppx_meta_conv

  1. Overview
  2. Docs
Decoding errors
type desc = [
  1. | `Exception of exn
  2. | `Unknown_fields of string * string list * Obj.t
  3. | `Unknown_tag of string * string
  4. | `Required_field_not_found of string * string
  5. | `Wrong_arity of int * int * (string * string) option
  6. | `Primitive_decoding_failure of string
  7. | `Sub_decoders_failed_for_one_of of string
]
type 'target trace = [ `Node of 'target | `Pos of int | `Field of string ] list

Position information of decoded data

type 'target t = desc * 'target * 'target trace
val format : (Format.formatter -> 'target -> unit) -> Format.formatter -> 'target t -> unit

Print out t with its trace

val format_desc : Format.formatter -> desc -> unit

Print out t without its trace

val format_trace_item : (Format.formatter -> 'target -> unit) -> Format.formatter -> [< `Field of string | `Node of 'target | `Pos of int ] -> unit

Print out one trace item

module LocalException (A : sig ... end) : sig ... end

LocalException functor to have exception with target type

OCaml

Innovation. Community. Security.