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

Catch-all error for truly unexpected failures.

This error is used when an error doesn't fit any other category
or when wrapping arbitrary error values.

## Examples

    iex> error = LeXtract.Error.Unknown.Unknown.exception(error: "something went wrong")
    iex> Exception.message(error)
    "something went wrong"

    iex> error = LeXtract.Error.Unknown.Unknown.exception(error: %RuntimeError{message: "boom"})
    iex> String.contains?(Exception.message(error), "RuntimeError")
    true

# `t`

```elixir
@type t() :: %LeXtract.Error.Unknown.Unknown{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  error: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

# `exception`

```elixir
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.Unknown.Unknown{
  __exception__: term(),
  bread_crumbs: term(),
  class: term(),
  error: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}
```

Create an `Elixir.LeXtract.Error.Unknown.Unknown` without raising it.

## Keys

- :error

# `message`

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

Formats the error message.

If the error is a binary string, returns it as-is.
Otherwise, inspects the error value.

---

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