Liking cljdoc? Tell your friends :D

hive-ttracking.time.error

The one refusal of the time core.

A refusal is an ex-info carrying :time/reason -- the CLOSED vocabulary below -- and :autonomous/error with the SAME value, so the autonomous runtime turns the throw into the right kind of refusal (autonomous.domain.answer/from-exception).

A reason outside the vocabulary is not a refusal: it is a caller defect, and becomes an ordinary ex-info with no :time/reason. A designed refusal is always recognisable; a defect never passes for one.

Closed sets are malli :enum, never hive-dsl defadt: hive-dsl 0.6.2 pulls data.json and core.async into every cljs client, too heavy to buy keyword dispatch for a handful of sets.

The one refusal of the time core.

A refusal is an ex-info carrying :time/reason -- the CLOSED vocabulary
below -- and :autonomous/error with the SAME value, so the autonomous
runtime turns the throw into the right kind of refusal
(autonomous.domain.answer/from-exception).

A reason outside the vocabulary is not a refusal: it is a caller defect,
and becomes an ordinary ex-info with no :time/reason. A designed refusal is
always recognisable; a defect never passes for one.

Closed sets are malli :enum, never hive-dsl defadt: hive-dsl 0.6.2 pulls
data.json and core.async into every cljs client, too heavy to buy keyword
dispatch for a handful of sets.
raw docstring

attemptclj/s

(attempt f & args)

Run (f & args): {:ok v} on the value, {:error reason :message msg} on a refusal of this library. Any other exception (a defect) is rethrown.

Run (f & args): {:ok v} on the value, {:error reason :message msg} on a
refusal of this library. Any other exception (a defect) is rethrown.
sourceraw docstring

reasonclj/s

(reason e)

The reason of a refusal, or nil when e is not a refusal of this library.

The reason of a refusal, or nil when `e` is not a refusal of this library.
sourceraw docstring

Reasonclj/s

The reason set as a malli :enum, for contracts and consumer validation.

The reason set as a malli :enum, for contracts and consumer validation.
sourceraw docstring

reason?clj/s

(reason? r)

True when r is in the closed reason vocabulary.

True when `r` is in the closed reason vocabulary.
sourceraw docstring

reasonsclj/s

The CLOSED vocabulary of refusal reasons.

Generic (day, month, period, zone, age, codecs) plus the two the ISO codec needs.

The CLOSED vocabulary of refusal reasons.

Generic (day, month, period, zone, age, codecs) plus the two the ISO codec
needs.
sourceraw docstring

refusal?clj/s

(refusal? e)

True when e is a designed refusal of this library.

True when `e` is a designed refusal of this library.
sourceraw docstring

refuseclj/s

(refuse reason msg)
(refuse reason msg data)

A refusal with reason (from the vocabulary) and msg. data joins the ex-data. A reason outside the vocabulary is a caller defect: an ex-info "unknown time reason", with no :time/reason.

A refusal with `reason` (from the vocabulary) and `msg`. `data` joins the
ex-data. A reason outside the vocabulary is a caller defect: an ex-info
"unknown time reason", with no :time/reason.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close