Liking cljdoc? Tell your friends :D

prpr.promise


all-prclj/s

(all-pr & ps)
source

always-prclj/smacro

(always-pr & body)

wraps body in a promise, even if the body exprs throw during evaluation

wraps body in a promise, even if the body exprs throw
during evaluation
sourceraw docstring

branch-prclj/s

(branch-pr p success-fn error-fn)
source

catchclj/smacro

(catch error-handler & body)

catches any errors and returns the result of applying the error-handler to the error-value

catches any errors and returns the result of
applying the error-handler to the error-value
sourceraw docstring

catch-errorclj/smacro

(catch-error body)

catches any errors and returns the results of decode-error-value on the error value. has to be a macro to catch any exceptions in the initial evaluation of the body

catches any errors and returns the results of decode-error-value
on the error value. has to be a macro to catch any exceptions
in the initial evaluation of the body
sourceraw docstring

catch-error-logclj/smacro

(catch-error-log description body)
source

catch-handleclj/smacro

(catch-handle handlers body)

catch-error and handle - any unhandled tags result in an exception

catch-error and handle - any unhandled tags result
in an exception
sourceraw docstring

catch-handle-safeclj/smacro

(catch-handle-safe default-response-or-fn body)
(catch-handle-safe handlers default-response-or-fn body)

catch-error and handle - if a tag is unhandled and a default-response-fn is provided then it will be called with the unhandled variant, if a default response value is provided then a warning will be logged and the default response value will be returned

catch-error and handle - if a tag is unhandled and
a default-response-fn is provided then it will be called
with the unhandled variant, if a default response value is
provided then a warning will be logged and the default
response value will be returned
sourceraw docstring

catch-logclj/smacro

(catch-log description error-handler & body)

catches any errors, logs them and returns the result of applying the error-handler to the error-value

catches any errors, logs them and returns the
result of applying the error-handler to the error-value
sourceraw docstring

catch-xform-errorclj/smacro

(catch-xform-error error-xform body)

catches any errors and returns the results of (error-xform (decode-error-value error-value))

catches any errors and returns the results of
(error-xform (decode-error-value error-value))
sourceraw docstring

chain-prclj/s

(chain-pr p & fs)
source

dadoclj/smacro

(dado & body)

alet with a deferred or pr-context

alet with a deferred or pr-context
sourceraw docstring

ddoclj/smacro

(ddo & body)

mlet with a deferred or pr-context

mlet with a deferred or pr-context
sourceraw docstring

decode-error-valueclj/s

(decode-error-value v)

decodes an error value to a variant. if the error-value is already a variant, or an ex-info with a variant, it returns that directly, otherwise you will get an [::unknown-error] variant

decodes an error value to a variant. if the error-value
is already a variant, or an ex-info with a variant,
it returns that directly, otherwise you will get an
[::unknown-error] variant
sourceraw docstring

delay-prclj/s

(delay-pr delay-ms value)
source

error-exclj/s

(error-ex [tag value])
(error-ex tag value)
(error-ex tag value cause)

encodes an error-variant on to an ex-info

encodes an error-variant on to an ex-info
sourceraw docstring

error-prclj/s

(error-pr [tag value])
(error-pr tag value)
(error-pr tag value cause)

creates an errored promise encoding the error-variant

creates an errored promise encoding the error-variant
sourceraw docstring

exception?clj/s

(exception? v)

true if the arg is a platform exception

true if the arg is a platform exception
sourceraw docstring

factory-prclj/s

(factory-pr factory-cb)

promesa-style promise creation - the factory-cb callback will receive resolve and reject fns to complete the promise

promesa-style promise creation - the factory-cb callback will
receive resolve and reject fns to complete the promise
sourceraw docstring

finallyclj/smacro

(finally callback & body)

finally for promises - makes sure to run the finally even if promise chain init throws. some exceptions might slip through the net - non-Exception Throwables on the jvm for example - but we are probably in deeper trouble anyway if that happens

finally for promises - makes sure to run the finally
even if promise chain init throws. some exceptions
might slip through the net - non-Exception Throwables
on the jvm for example - but we are probably in deeper
trouble anyway if that happens
sourceraw docstring

handleclj/s

(handle handlers [tag value])

handle a variant

  • handlers : map of tag to handler

if a handler is not available for the tag then an error-ex with tag ::unhandled-tag will be thrown

handle a variant
   - handlers : map of tag to handler

if a handler is not available for the tag then
an error-ex with tag ::unhandled-tag will be thrown
sourceraw docstring

handle-safeclj/s

(handle-safe handlers default-response-or-fn [tag value])

safely handle a variant

  • handlers : a map of tag to handler

if a handler is not available and a default-response fn is provided it will be called with the unhandled variant, if a default-response value is provided then a warning will be logged for the unhandled variant, and the default response value will be returned

safely handle a variant
  - handlers : a map of tag to handler

if a handler is not available and a default-response fn
is provided it will be called with the unhandled variant,
if a default-response value is provided then a warning
will be logged for the unhandled variant, and the
default response value will be returned
sourceraw docstring

promise?clj/s

(promise? v)
source

success-prclj/s

(success-pr value)

creates a promise containing the value

creates a promise containing the value
sourceraw docstring

wrap-catch-errorclj/smacro

(wrap-catch-error body)
(wrap-catch-error tag body)

wraps any normal responses in a [tag <response>] variant, and catches any errors and returns the results of decode-error-value on the error value. has to be a macro to catch any exceptions in the initial evaluation of the body

wraps any normal responses in a [tag <response>] variant, and
catches any errors and returns the results of decode-error-value
on the error value. has to be a macro to catch any exceptions
in the initial evaluation of the body
sourceraw docstring

wrap-catch-error-logclj/smacro

(wrap-catch-error-log description body)
(wrap-catch-error-log description tag body)

wraps any normal responses in a [tag <response>] variant, and catches any errors and returns the results of decode-error-value on the error value. has to be a macro to catch any exceptions in the initial evaluation of the body

wraps any normal responses in a [tag <response>] variant, and
catches any errors and returns the results of decode-error-value
on the error value. has to be a macro to catch any exceptions
in the initial evaluation of the body
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close