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

An exception raised when invoking an Erlang code that errors
with a value not handled by Elixir.

Most common error reasons, such as `:badarg` are automatically
converted into exceptions by Elixir. However, you may invoke some
code that emits a custom error reason and those get wrapped into
`ErlangError`:

    iex> :erlang.error(:some_invalid_error)
    ** (ErlangError) Erlang error: :some_invalid_error

---

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