LeXtract.Error.Processing.Resolution exception (lextract v0.1.2)

View Source

Error for extraction resolution failures.

Raised when LLM output cannot be resolved into Extraction structs, typically due to missing extraction data or malformed response structure.

Examples

iex> error = LeXtract.Error.Processing.Resolution.exception(
...>   reason: "Could not find extractions array in parsed data"
...> )
iex> String.contains?(Exception.message(error), "extractions array")
true

Summary

Functions

Formats the error message for resolution failures.

Types

t()

@type t() :: %LeXtract.Error.Processing.Resolution{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  path: term(),
  reason: String.t(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Processing.Resolution{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  path: term(),
  reason: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.LeXtract.Error.Processing.Resolution without raising it.

Keys

  • :reason

message(exception)

@spec message(t()) :: String.t()

Formats the error message for resolution failures.