# `BadFunctionError`
[🔗](https://github.com/elixir-lang/elixir/blob/v1.20.1/lib/elixir/lib/exception.ex#L1437)

An exception raised when a function is expected, but something else was given.

For example:

    iex> value = "hello"
    iex> value.()
    ** (BadFunctionError) expected a function, got: "hello"

---

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