OneFlight.Error exception (OneFlight v0.2.0)

Copy Markdown View Source

Error returned by OneFlight non-bang APIs and raised by bang APIs.

Summary

Types

kind()

@type kind() :: :error | :exit | :throw

reason()

@type reason() ::
  :timeout | :execution | :cancelled | :invalid_option | :cluster_unreachable

t()

@type t() :: %OneFlight.Error{
  __exception__: true,
  kind: kind() | nil,
  message: String.t(),
  payload: term(),
  reason: reason(),
  stacktrace: list() | nil
}

Functions

cluster_unreachable()

@spec cluster_unreachable() :: t()

execution(kind, payload, stacktrace)

@spec execution(kind(), term(), list()) :: t()

invalid_option(message)

@spec invalid_option(String.t()) :: t()

timeout()

@spec timeout() :: t()