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

View Source

Error for text chunking failures.

Raised when document chunking fails, typically due to tokenization issues or invalid chunk parameters.

Examples

iex> error = LeXtract.Error.Processing.Chunking.exception(
...>   reason: "chunk size must be positive"
...> )
iex> Exception.message(error)
"Chunking failed: chunk size must be positive"

Summary

Functions

Formats the error message for chunking failures.

Types

t()

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

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

Keys

  • :reason

message(exception)

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

Formats the error message for chunking failures.