Liking cljdoc? Tell your friends :D

fx.observability.diagnostics

Rich defect tracking, Cause algebra, sandboxing, and causal AST execution trace rendering for fx.

Rich defect tracking, Cause algebra, sandboxing, and causal AST execution trace rendering for fx.
raw docstring

cause-dieclj/s

(cause-die defect)

Creates a Cause representing an unexpected defect / Throwable exception.

Creates a Cause representing an unexpected defect / Throwable exception.
raw docstring

cause-failclj/s

(cause-fail failure)

Creates a Cause representing a checked domain Failure.

Creates a Cause representing a checked domain Failure.
raw docstring

cause-interruptclj/s

(cause-interrupt reason)

Creates a Cause representing computation cancellation or interruption.

Creates a Cause representing computation cancellation or interruption.
raw docstring

cause-parallelclj/s

(cause-parallel causes)

Creates a composite Cause representing accumulated parallel failures.

Creates a composite Cause representing accumulated parallel failures.
raw docstring

cause-sequentialclj/s

(cause-sequential c1 c2)

Creates a composite Cause representing sequential failures.

Creates a composite Cause representing sequential failures.
raw docstring

cause?clj/s

(cause? x)

Returns true if x implements ICause.

Returns true if `x` implements ICause.
raw docstring

defectsclj/s

(defects cause)

Collects all defect Throwables contained within cause tree into a vector.

Collects all defect Throwables contained within `cause` tree into a vector.
raw docstring

die-cause?clj/s

(die-cause? x)

Returns true if x is a Die cause.

Returns true if `x` is a Die cause.
raw docstring

fail-cause?clj/s

(fail-cause? x)

Returns true if x is a Fail cause.

Returns true if `x` is a Fail cause.
raw docstring

failuresclj/s

(failures cause)

Collects all IFailure values contained within cause tree into a vector.

Collects all IFailure values contained within `cause` tree into a vector.
raw docstring

ICauseclj/sprotocol

Protocol for structured Cause error tree algebra nodes.

Protocol for structured Cause error tree algebra nodes.

cause-typeclj/s

(cause-type this)

Returns the keyword classification of this cause node.

Returns the keyword classification of this cause node.
raw docstring

interrupt-cause?clj/s

(interrupt-cause? x)

Returns true if x is an Interrupt cause.

Returns true if `x` is an Interrupt cause.
raw docstring

parallel-cause?clj/s

(parallel-cause? x)

Returns true if x is a Parallel cause.

Returns true if `x` is a Parallel cause.
raw docstring

render-causeclj/s

(render-cause cause)

Formats a Cause tree into a human-readable hierarchical ASCII string.

Formats a `Cause` tree into a human-readable hierarchical ASCII string.
raw docstring

render-execution-traceclj/s

(render-execution-trace leaf-effect)
(render-execution-trace leaf-effect failure-or-cause)

Inspects the AST pipeline of leaf-effect using fx.utils and formats an execution trace showing each step from root to leaf, optionally highlighting failure-or-cause.

Inspects the AST pipeline of `leaf-effect` using `fx.utils` and formats an execution trace
showing each step from root to leaf, optionally highlighting `failure-or-cause`.
raw docstring

sandbox>clj/s

(sandbox> eff)
(sandbox> prev-effect eff)

Catches both domain IFailure records and unexpected thrown Throwable defects, exposing them as a typed Cause value (Fail or Die) on the success channel.

Example: (-> (risky-operation>) (fx.observability.diagnostics/sandbox>) (fx/map> (fn [cause-or-val] (if (fx.observability.diagnostics/cause? cause-or-val) (handle-cause cause-or-val) cause-or-val))))

Catches both domain `IFailure` records and unexpected thrown `Throwable` defects,
exposing them as a typed `Cause` value (`Fail` or `Die`) on the success channel.

Example:
  (-> (risky-operation>)
      (fx.observability.diagnostics/sandbox>)
      (fx/map> (fn [cause-or-val]
                 (if (fx.observability.diagnostics/cause? cause-or-val)
                   (handle-cause cause-or-val)
                   cause-or-val))))
raw docstring

sequential-cause?clj/s

(sequential-cause? x)

Returns true if x is a Sequential cause.

Returns true if `x` is a Sequential cause.
raw docstring

unsandbox>clj/s

(unsandbox> eff)
(unsandbox> prev-effect eff)

Inverts sandbox> by re-emitting Cause values as effect failures (Fail) or throwing unexpected defects (Die). Passes non-Cause success values through.

Example: (-> (fx.observability.diagnostics/sandbox> (work>)) (fx/map> transform-cause) (fx.observability.diagnostics/unsandbox>))

Inverts `sandbox>` by re-emitting `Cause` values as effect failures (`Fail`) or
throwing unexpected defects (`Die`). Passes non-Cause success values through.

Example:
  (-> (fx.observability.diagnostics/sandbox> (work>))
      (fx/map> transform-cause)
      (fx.observability.diagnostics/unsandbox>))
raw 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