(try-run proc
&
{:keys [catch? failed?]
:or {catch? (constantly false) failed? (constantly false)}})
Runs proc
and returns a tuple denoting the result.
The first element on the tuple is a keyword denoting the result as follows:
catch?
is called with the exception as argument.
If catch?
returns true, return ::exception
. Otherwise it will rethrow the
exception.failed?
is called with the result. If
failed?
returns true, return ::failed
failed?
is called with the result. If
failed?
returns false, return ::succeeded
Runs `proc` and returns a tuple denoting the result. The first element on the tuple is a keyword denoting the result as follows: - If there's an exception `catch?` is called with the exception as argument. If `catch?`returns true, return `::exception`. Otherwise it will rethrow the exception. - If no exceptions are thrown, `failed?` is called with the result. If `failed?` returns true, return `::failed` - If no exceptions are thrown, `failed?` is called with the result. If `failed?` returns false, return `::succeeded`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close