Iconvex.Error exception (iconvex v0.1.1)

Copy Markdown View Source

Typed conversion failure.

Decode failures carry offset, offset_unit, and sequence; encode failures carry the first unrepresentable Unicode codepoint. Ordinary conversion errors use byte offsets. Packed conversion helpers use bit offsets and retain the exact packed fragment.

Summary

Types

kind()

@type kind() :: :invalid_sequence | :incomplete_sequence | :unrepresentable_character

t()

@type t() :: %Iconvex.Error{
  __exception__: true,
  codepoint: non_neg_integer() | nil,
  encoding: String.t(),
  kind: kind(),
  message: String.t(),
  offset: non_neg_integer() | nil,
  offset_unit: :byte | :bit,
  sequence: bitstring() | Iconvex.Packed.LSB.t() | nil
}