AgentWorld.Error exception (agent_world v0.1.0)

Copy Markdown

Structured error used by the shared AgentBook helpers.

Summary

Types

kind()

@type kind() :: :invalid_argument | :unsupported | :io | :internal

t()

@type t() :: %AgentWorld.Error{
  __exception__: true,
  details: map(),
  kind: kind(),
  message: String.t()
}

Functions

internal(message, details \\ %{})

@spec internal(String.t(), map()) :: t()

invalid_argument(message, details \\ %{})

@spec invalid_argument(String.t(), map()) :: t()

io(message, details \\ %{})

@spec io(String.t(), map()) :: t()

new(reason)

@spec new(term()) :: t()

unsupported(message, details \\ %{})

@spec unsupported(String.t(), map()) :: t()