Module Bin_errorSource

Sourcemodule Len = Bin_type.Len
Sourcemodule Off = Bin_type.Off
Sourcetype kind =
  1. | Truncated of {
    1. need : Len.t;
    2. have : Len.t;
    }
  2. | Out_of_range of {
    1. kind : string;
    2. value : string;
    }
  3. | Unexpected_tag of {
    1. tag : int;
    2. expected : int list;
    }
  4. | Length_mismatch of {
    1. expected : int;
    2. got : int;
    }
  5. | Msg of string
Sourcetype t = {
  1. context : string list;
  2. offset : Off.abs Off.t;
  3. kind : kind;
}
Sourceval pp_kind : Format.formatter -> kind -> unit
Sourceval pp : Format.formatter -> t -> unit
Sourceexception Error of t
Sourceval to_string : t -> string
Sourceval msgf : ('a, Format.formatter, unit, 'b) format4 -> 'a
Sourceval v : offset:Off.abs Off.t -> kind -> 'a
Sourceval truncated : offset:Off.abs Off.t -> need:Len.t -> have:Len.t -> 'a
Sourceval out_of_range : offset:Off.abs Off.t -> kind:string -> value:string -> 'a
Sourceval unexpected_tag : offset:Off.abs Off.t -> tag:int -> expected:int list -> 'a
Sourceval length_mismatch : offset:Off.abs Off.t -> expected:int -> got:int -> 'a
Sourceval reraise_in : string -> exn -> 'a
Sourceval need_bytes : limit:Off.abs Off.t -> offset:Off.abs Off.t -> need:Len.t -> unit