# `ToonEx.EncodeError`
[🔗](https://github.com/ohhi-vn/toon_ex/blob/v1.1.0/lib/toon_ex/errors/encode_error.ex#L1)

Exception raised when encoding fails.

This exception is raised when the encoder encounters an error while
converting Elixir data structures to TOON format.

# `t`

```elixir
@type t() :: %ToonEx.EncodeError{
  __exception__: true,
  message: String.t(),
  reason: term(),
  value: term()
}
```

# `exception`

Creates a new EncodeError.

## Examples

    iex> ToonEx.EncodeError.exception(message: "Invalid value", value: :atom)
    %ToonEx.EncodeError{message: "Invalid value", value: :atom, reason: nil}

---

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