Tempo.UnboundedSetError exception (Tempo v1.0.0)

Copy Markdown View Source

Exception raised when an aggregate operation needs every member of an interval set whose backend is unbounded (a lazy generator such as Tempo.weekends/1).

Unbounded sets support the walking operations — Enum.take/2, Tempo.IntervalSet.walk/1, covered?/2, first/1, and use as a skipping: busy set — but any operation whose answer requires the whole member list (to_list/1, count/1, coalesce/1, set algebra) refuses rather than walking forever. Bound the set first: intersect the walk with a finite span, or take the members you need.

Summary

Types

t()

@type t() :: %Tempo.UnboundedSetError{
  __exception__: term(),
  operation: atom() | String.t() | nil,
  set: Tempo.IntervalSet.t() | nil
}