Tempo.MaterialisationError exception (Tempo v0.20.0)

Copy Markdown View Source

Exception raised when a value cannot be materialised into an explicit Tempo.Interval or Tempo.IntervalSet.

Reasons include a bare Tempo.Duration (no time-line anchor), a one-of Tempo.Set (epistemic disjunction, not an interval list), a Tempo already at its finest resolution (no finer unit to bound the implicit span), and an unanchored group (e.g. 5G10DU — days 41..50 with no year/month to bound the span).

Summary

Types

reason()

@type reason() ::
  :bare_duration
  | :one_of_set
  | :finest_resolution
  | :unanchored_group
  | atom()
  | String.t()

t()

@type t() :: %Tempo.MaterialisationError{
  __exception__: term(),
  reason: reason() | nil,
  value: any() | nil
}