# `Carvex.CarveError`
[🔗](https://github.com/paradox460/carvex/blob/v0.0.1/lib/carvex/carve_error.ex#L1)

Raised (or returned) when parsing, rendering, sanitizing, or highlighting a Carve document fails.

`reason` holds the underlying cause. Engine failures are `{kind, message}` where
`kind` is one of `:profile_violation`, `:invalid_ast`, `:render`, `:invalid_option`
or `:panic`; other reasons include `{:highlight, error}`, `{:invalid_node, term}`,
`{:unknown_ast_type, type}` and `{:unknown_ast_field, type, key}`.

# `t`

```elixir
@type t() :: %Carvex.CarveError{
  __exception__: term(),
  message: String.t(),
  reason: term()
}
```

---

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