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

An exception raised when an argument to a function is invalid.

You can raise this exception when you want to signal that an argument to
a function is invalid. For example, this exception is raised when calling
`Integer.to_string/1` with an invalid argument:

    iex> Integer.to_string(1.0)
    ** (ArgumentError) errors were found at the given arguments:
    ...

`ArgumentError` exceptions have a single field, `:message` (a `t:String.t/0`),
which is public and can be accessed freely when reading or creating `ArgumentError`
exceptions.

---

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