View Source WaitForIt.TimeoutError exception (WaitForIt v2.1.2)

Exception type to represent a timeout that occurred while waiting.

Summary

Types

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

t()

Types

@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
@type t() :: %WaitForIt.TimeoutError{
  __exception__: true,
  env: env(),
  last_value: term(),
  message: String.t(),
  timeout: non_neg_integer(),
  waitable: WaitForIt.Waitable.t()
}