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

View Source

Error for text alignment failures.

Raised when extracted text cannot be aligned back to source text positions, typically due to tokenization mismatches or encoding issues.

Examples

iex> error = LeXtract.Error.Processing.Alignment.exception(
...>   reason: "no matching sequence found"
...> )
iex> Exception.message(error)
"Alignment failed: no matching sequence found"

Summary

Functions

Formats the error message for alignment failures.

Types

t()

@type t() :: %LeXtract.Error.Processing.Alignment{
  __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.Alignment{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  path: term(),
  reason: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

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

Keys

  • :reason

message(exception)

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

Formats the error message for alignment failures.