# `WaitForIt.TimeoutError`
[🔗](https://github.com/jvoegele/wait_for_it/blob/2.2.1/lib/wait_for_it/timeout_error.ex#L1)

Exception type to represent a timeout that occurred while waiting.

# `env`

```elixir
@type env() :: %{
  context: Macro.Env.context(),
  context_modules: Macro.Env.context_modules(),
  file: Macro.Env.file(),
  function: Macro.Env.name_arity() | nil,
  line: Macro.Env.line(),
  module: module()
}
```

Type to represent the `:env` field of `WaitForIt.TimeoutError` exceptions.

This struct is a subset of of `Macro.Env` and contains the following fields:

  * `context` - the context of the environment; it can be nil (default context), :guard
    (inside a guard) or :match (inside a match)
  * `context_modules` - a list of modules defined in the current context
  * `file` - the current absolute file name as a binary
  * `function` - a tuple as {atom, integer}, where the first element is the function name and
    the second its arity; returns nil if not inside a function
  * `line` - the current line as an integer
  * `module` - the current module name

# `t`

```elixir
@type t() :: %WaitForIt.TimeoutError{
  __exception__: true,
  env: env(),
  last_value: term(),
  message: String.t(),
  timeout: non_neg_integer(),
  waitable: WaitForIt.Waitable.t()
}
```

---

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