Hourglass.Error (hourglass v0.1.0)

Copy Markdown View Source

Higher-level error returned from Hourglass.* facade calls. Distinct from Hourglass.Bridge.Error (low-level wire error); facade functions translate Bridge.Error to this type.

Summary

Functions

Translates a low-level Hourglass.Bridge.Error into this facade error type.

Types

reason()

@type reason() ::
  :unreachable
  | :namespace_unavailable
  | :already_started
  | :not_found
  | :timeout
  | :canceled
  | :rpc_error

t()

@type t() :: %Hourglass.Error{detail: term(), reason: reason()}

Functions

from_bridge_error(err)

@spec from_bridge_error(Hourglass.Bridge.Error.t()) :: t()

Translates a low-level Hourglass.Bridge.Error into this facade error type.

new(reason, detail \\ nil)

@spec new(reason(), term()) :: t()