# `LeXtract.Error.Processing.Chunking`
[🔗](https://github.com/YgorCastor/lextract.git/blob/main/lib/lextract/error/processing/chunking.ex#L1)

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"

# `t`

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

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Processing.Chunking{
  __exception__: term(),
  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`

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

Formats the error message for chunking failures.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
