Module Common.ReadError

type t =
  1. | Neg_int8
    (*

    Negative integer was positive or zero

    *)
  2. | Int_code
    (*

    Unknown integer code while reading integer

    *)
  3. | Int_overflow
    (*

    Overflow reading integer

    *)
  4. | Nat0_code
    (*

    Unknown integer code while reading natural number

    *)
  5. | Nat0_overflow
    (*

    Overflow reading natural number

    *)
  6. | Int32_code
    (*

    Unknown integer code while reading 32bit integer

    *)
  7. | Int64_code
    (*

    Unknown integer code while reading 64bit integer

    *)
  8. | Nativeint_code
    (*

    Unknown integer code while reading native integer

    *)
  9. | Unit_code
    (*

    Illegal unit value

    *)
  10. | Bool_code
    (*

    Illegal boolean value

    *)
  11. | Option_code
    (*

    Illegal option code

    *)
  12. | String_too_long
    (*

    String too long

    *)
  13. | Variant_tag
    (*

    Untagged integer encoding for variant tag

    *)
  14. | Array_too_long
    (*

    Array too long

    *)
  15. | List_too_long of {
    1. len : int;
    2. max_len : int;
    }
    (*

    List too long

    *)
  16. | Hashtbl_too_long
    (*

    Hashtable too long

    *)
  17. | Sum_tag of string
    (*

    Illegal sum tag for given type

    *)
  18. | Variant of string
    (*

    Illegal variant for given type

    *)
  19. | Poly_rec_bound of string
    (*

    Attempt to read data bound through polymorphic record fields

    *)
  20. | Variant_wrong_type of string
    (*

    Unexpected attempt to read variant with given non-variant type

    *)
  21. | Silly_type of string
    (*

    Silly_type type_name indicates unhandled but silly case where a type of the sort type 'a type_name = 'a is used with a polymorphic variant as type parameter and included in another polymorphic variant type.

    *)
  22. | Empty_type of string
    (*

    Attempt to read data that corresponds to an empty type.

    *)
val to_string : t -> string

to_string err

  • returns

    string representation of read error err.