Toon.DecodeError exception (toon v0.3.0)

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() :: %Toon.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> Toon.DecodeError.exception(message: "Unexpected token", line: 1, column: 5)
%Toon.DecodeError{
  message: "Unexpected token",
  input: nil,
  line: 1,
  column: 5,
  context: nil,
  reason: nil
}