References: - https://github.com/zcaudate/hara/blob/master/src/hara/common/error.clj
(aif test then)
(aif test then else)
(compile-if test then)
(compile-if test then else)
Evaluates test
. If it returns logical true (and doesn't throw), expands
to then
, otherwise expands to else
.
Evaluates `test`. If it returns logical true (and doesn't throw), expands to `then`, otherwise expands to `else`.
(compile-when test & body)
(error e & [opt? & more])
Throws an exception when called.
(error "This is an error") => (throws Exception "This is an error")
(error (Exception. "This is an error") "This is a chained error") => (throws Exception "This is a chained error")
Throws an exception when called. (error "This is an error") => (throws Exception "This is an error") (error (Exception. "This is an error") "This is a chained error") => (throws Exception "This is a chained error")
(exception & xs)
(if-clj then else)
(if-cljs then else)
(suppress body)
(suppress body catch-val)
Suppresses any errors thrown in the body.
(suppress (error "Error")) => nil
(suppress (error "Error") :error) => :error
(suppress (error "Error") (fn [e] (.getMessage e))) => "Error"
Suppresses any errors thrown in the body. (suppress (error "Error")) => nil (suppress (error "Error") :error) => :error (suppress (error "Error") (fn [e] (.getMessage e))) => "Error"
(throwable-class)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close