# `Markup.Carve.Error`
[🔗](https://github.com/paradox460/markup/blob/markup_carve-v0.1.0/markup_carve/lib/markup/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}`, `{:unknown_ast_field, type, key}` and `:raw_not_allowed`.

# `t`

```elixir
@type t() :: %Markup.Carve.Error{
  __exception__: term(),
  message: String.t(),
  reason: term()
}
```

---

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