ITF.Error exception (itf v0.1.0)

Copy Markdown View Source

A source-aware, path-aware ITF decoding error.

Summary

Types

reason()

@type reason() ::
  {:file_error, File.posix()}
  | :not_regular_file
  | {:input_too_large, pos_integer()}
  | :invalid_json
  | {:expected, :object | :array | :string | :integer}
  | :missing_field
  | :invalid_name
  | :duplicate_name
  | :overlapping_declaration
  | :missing_state_value
  | :invalid_loop_index
  | :invalid_bigint
  | :invalid_tuple
  | :invalid_set
  | :invalid_map
  | :invalid_map_entry
  | :invalid_variant
  | :invalid_unserializable
  | {:unknown_tag, String.t()}
  | :unsupported_number
  | :unsupported_null
  | {:max_depth_exceeded, pos_integer()}

t()

@type t() :: %ITF.Error{
  __exception__: term(),
  path: [String.t() | non_neg_integer()],
  reason: reason(),
  source: :binary | Path.t()
}