(-match-map? x m)
chech if x
has every kv
from m
chech if `x` has every `kv` from `m`
(attempt & body)
like catching
, but takes body
as argument
like [[catching]], but takes `body` as argument
(call x f)
attempt
to call function f
on value x
[[attempt]] to call function `f` on value `x`
(catch-errors & body)
like catching
, but returns a vector where the first element is the result of
executing the body
and the second is an Exception
like [[catching]], but returns a vector where the first element is the result of executing the `body` and the second is an `Exception`
(catching expr)
(catching expr err catch)
(catching expr err catch finally)
try
to execute expr
, if catch
an error returns it itself
`try` to execute `expr`, if `catch` an error returns it itself
(ensure-fail x)
ensure that Exception
err
is Fail
ensure that `Exception` `err` is [[Fail]]
(exception-info? x)
check if x
is ExceptionInfo
check if `x` is `ExceptionInfo`
(fail? x)
check if x
is instance of Exception or js/Error in cljs
check if `x` is instance of Exception or js/Error in cljs
(finally x f)
attempt
to call function f
on unreduced
value of x
. return x
unchanged and unreduced
.
[[attempt]] to call function `f` on `unreduced` value of `x`. return `x` unchanged and `unreduced`.
(if-ok test-or-bindings then)
(if-ok test-or-bindings then else)
Like core/if-let
but can bind multiple values for then
iff all tests
are ok?
Like `core/if-let` but can bind multiple values for `then` iff all tests are `ok?`
(isa? x pred)
check if x
meets pred
, or whether Exception
has in ex-data
under the
key k
the value v
check if `x` meets `pred`, or whether `Exception` has in `ex-data` under the key `k` the value `v`
(maybe-throw x)
throw
x
if x
meets fail?
`throw` `x` if `x` meets [[fail?]]
(throw-if x pred)
(throw-if x pred msg-or-fn)
(throw-if x pred msg data)
(thru x f)
attempt
to call function f
on unreduced
value of x
. return x
unchanged. used for side effects
[[attempt]] to call function `f` on `unreduced` value of `x`. return `x` unchanged. used for side effects
(when-ok test-or-bindings & body)
Like clojure.core/when
however if first arg is binding vector behave like
clojure.core/when-let
, but can bind multiple values. check if all tests/bindings
are ok?
, else return fail
Like `clojure.core/when` however if first arg is binding vector behave like `clojure.core/when-let`, but can bind multiple values. check if all tests/bindings are [[ok?]], else return `fail`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close