# `SyntaxError`
[🔗](https://github.com/elixir-lang/elixir/blob/v1.20.0-rc.3/lib/elixir/lib/exception.ex#L1223)

An exception raised when there's a syntax error when parsing code.

For example:

    iex> Code.eval_string("5 + 5h")
    ** (SyntaxError) invalid syntax found on nofile:1:5:
    ...

The following fields of this exceptions are public and can be accessed freely:

  * `:file` (`t:Path.t/0` or `nil`) - the file where the error occurred, or `nil` if
    the error occurred in code that did not come from a file
  * `:line` - the line where the error occurred
  * `:column` - the column where the error occurred
  * `:description` - a description of the syntax error

---

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