ToonEx.DecodeError exception (toon_ex v1.1.0)

Copy Markdown View Source

Exception raised when decoding fails.

This exception is raised when the decoder encounters an error while parsing TOON format strings. It includes detailed information about the error location and context.

Summary

Functions

Creates a new DecodeError.

Types

t()

@type t() :: %ToonEx.DecodeError{
  __exception__: true,
  column: pos_integer() | nil,
  context: String.t() | nil,
  input: String.t() | nil,
  line: pos_integer() | nil,
  message: String.t(),
  reason: term()
}

Functions

exception(msg)

Creates a new DecodeError.

Examples

iex> ToonEx.DecodeError.exception(message: "Unexpected token", line: 1, column: 5)
%ToonEx.DecodeError{
  message: "Unexpected token",
  input: nil,
  line: 1,
  column: 5,
  context: nil,
  reason: nil
}