# `MDL.Error`
[🔗](https://github.com/zthacker/mdl/blob/v0.2.0/bindings/elixir/lib/mdl/error.ex#L1)

Why an operation failed (spec/api.md section 4), returned as
`{:error, %MDL.Error{}}`, never raised by MDL itself. It's an exception,
so a caller may raise it.

* `:code`: an atom that names the problem and keeps its meaning across
  releases (`:unknown_family`, `:past_end`, `:invalid_build`). Match on
  it, not on the message.
* `:message`: for people; it may change in any release.
* `:problems`: for an error that stands for several (a build that
  doesn't validate, bindings with problems on several rows), each as an
  `MDL.Problem`; otherwise empty.

# `t`

```elixir
@type t() :: %MDL.Error{
  __exception__: term(),
  code: atom(),
  message: String.t(),
  problems: [MDL.Problem.t()]
}
```

---

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