# `Expression.Error`

A structured error type for expression parsing and evaluation failures.

Provides a single, consistent error representation across the library,
replacing the previous mix of `RuntimeError` exceptions, `{:error, string}`
tuples, and error maps.

## Fields

  * `:type` - the category of error (`:parse`, `:eval`, `:type`, `:function`)
  * `:message` - a human-readable description of what went wrong
  * `:expression` - the expression string that caused the error, if available
  * `:position` - the character position in the expression where the error
    occurred, if available

# `error_type`

```elixir
@type error_type() :: :parse | :eval | :type | :function
```

# `t`

```elixir
@type t() :: %Expression.Error{
  __exception__: true,
  expression: String.t() | nil,
  message: String.t(),
  position: non_neg_integer() | nil,
  type: error_type()
}
```

---

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