Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

merr.core


errclj/s

(err)
(err x)

Returns value as Error.

=> (type (err "foo")) merr.core.MerrError

=> @(err "foo") "foo"

Returns value as Error.

=> (type (err "foo"))
merr.core.MerrError

=> @(err "foo")
"foo"
sourceraw docstring

err?clj/s

(err? x)

Returns true if x is Error.

=> (err? "foo") false

=> (err? (err "foo")) true

Returns true if x is Error.

=> (err? "foo")
false

=> (err? (err "foo"))
true
sourceraw docstring

letclj/smacro

(let err-sym bindings & body)

binding => binding-form init-expr If init-expr is not Error, binding-form bound to the value, if not, err-sym bound to the Error value and rest bindings are skipped.

=> (let +err+ [a 1 => b (inc a)] => [b +err+]) [2 nil]

=> (let +err+ [a (err "ERR") => b (inc a)] => [b (err? +err+)]) [nil true]

binding => binding-form init-expr
 If init-expr is not Error, binding-form bound to the value,
 if not, err-sym bound to the Error value and rest bindings are skipped.

=> (let +err+ [a 1
=>             b (inc a)]
=>   [b +err+])
[2 nil]

=> (let +err+ [a (err "ERR")
=>             b (inc a)]
=>   [b (err? +err+)])
[nil true]
sourceraw docstring

MerrErrorcljs

source

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

× close