# `Schooner.Lexer.Error`
[🔗](https://github.com/ausimian/schooner/blob/1.0.0/lib/schooner/lexer/error.ex#L1)

Exception raised by the lexer on malformed source.

Each error carries:

  * `:reason` — a structured term identifying the failure mode (atom or
    tagged tuple); meant to be machine-matchable in tests
  * `:position` — `{line, column}` of the offending input

The pretty `:message` is generated lazily so tests can assert on
`:reason` and `:position` without coupling to wording.

---

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