Liking cljdoc? Tell your friends :D

dawcs.flow


*catch-from*clj

Base exception class which will be caught by call. Dynamic, defaults to Throwable. Use catch-from! or catching to modify

Base exception class which will be caught by `call`. Dynamic, defaults to `Throwable`. Use `catch-from!` or `catching` to modify
sourceraw docstring

*default-handler*clj

Default handler for processing caught exceptions. When caught an exception which class is *catch-from* or a subclass of it, and is not listed in *ignored-exceptions*(and is not a subclass of any classes listed there) returns instance of caught exception, otherwise throws it

Default handler for processing caught exceptions. When caught an exception
which class is `*catch-from*` or a subclass of it, and is not listed in `*ignored-exceptions*`(and is not a subclass of any classes listed there)
returns instance of caught exception, otherwise throws it
sourceraw docstring

*ignored-exceptions*clj

Exception classes which will be ignored by call. Dynamic, defaults to empty set. Use ignore-exceptions!, add-ignored-exceptions! or ignoring to modify

Exception classes which will be ignored by `call`. Dynamic, defaults to empty set. Use `ignore-exceptions!`, `add-ignored-exceptions!` or `ignoring` to modify
sourceraw docstring

add-ignored-exceptions!clj

(add-ignored-exceptions! ex-class-set)

Adds given set of classes to *ignored-exceptions*

Adds given set of classes to `*ignored-exceptions*`
sourceraw docstring

callclj

(call f & args)

Calls given function with supplied args in try/catch block, then calls *default-handler* on caught exception. If no exception has caught during function call returns its result

Calls given function with supplied args in `try/catch` block, then calls `*default-handler*` on caught exception. If no exception has caught during function call returns its result
sourceraw docstring

call-withclj

(call-with handler f & args)

Calls given function with supplied args in try/catch block, then calls handler on caught exception. If no exception has caught during function call returns its result

Calls given function with supplied args in `try/catch` block, then calls handler on caught exception. If no exception has caught during function call returns its result
sourceraw docstring

catch-from!clj

(catch-from! ex-class)

Sets exception-base-class to specified class

Sets *exception-base-class* to specified class
sourceraw docstring

catchingcljmacrodeprecated

(catching exception-base-class & body)

Executes body with *exception-base-class* bound to given class. Deprecated due to possible problems with multi-threaded code. Use call-with to achieve same behavior with thread-safety

Executes body with `*exception-base-class*` bound to given class.
Deprecated due to possible problems with multi-threaded code. Use `call-with` to achieve same behavior with thread-safety
sourceraw docstring

elseclj

(else f value)

If value is a fail?, calls applies f to it, otherwise returns value

If value is a `fail?`, calls applies f to it, otherwise returns value
sourceraw docstring

else-callclj

(else-call f value)

If value is a fail?, applies f to it wrapped to call, otherwise returns value

If value is a `fail?`, applies f to it wrapped to `call`, otherwise returns value
sourceraw docstring

else-ifclj

(else-if ex-class f value)

If value is an exception of ex-class, applies f to it, otherwise returns value

If value is an exception of ex-class, applies f to it, otherwise returns value
sourceraw docstring

failcljdeprecated

(fail)
(fail msg-or-data)
(fail msg data)
(fail msg data cause)

Calls ex-info with given msg(optional, defaults to nil), data(optional, defaults to {}) and cause(optional, defaults to nil). Deprecated, use ex-info instead

Calls `ex-info` with given msg(optional, defaults to nil), data(optional, defaults to {}) and cause(optional, defaults to nil).
Deprecated, use `ex-info` instead
sourceraw docstring

fail!cljdeprecated

(fail! & args)

Constructs fail with given args and throws it. Deprecated, use ex-info with throw instead

Constructs `fail` with given args and throws it.
Deprecated, use `ex-info` with `throw` instead
sourceraw docstring

fail-withclj

(fail-with {:keys [msg data cause suppress? trace?]
            :or {data {} suppress? false trace? false}
            :as options})

Constructs Fail with given options. Stacktrace is disabled by default

Constructs `Fail` with given options. Stacktrace is disabled by default
sourceraw docstring

fail-with!clj

(fail-with! {:keys [trace?] :or {trace? true} :as options})

Constructs Fail with given options and throws it. Stacktrace is enabled by default.

Constructs `Fail` with given options and throws it. Stacktrace is enabled by default.
sourceraw docstring

fail?clj

(fail? t)
(fail? ex-class t)

Checks if value is exception of given class(optional, defaults to Throwable)

Checks if value is exception of given class(optional, defaults to Throwable)
sourceraw docstring

fletcljmacro

(flet bindings & body)

Flow adaptation of Clojure let. Wraps evaluation of each binding to call-with with *default-handler*. If fail? value returned from binding evaluation, it's returned immediately and all other bindings and body are skipped. May use custom exception handler passed as first binding with name :handler

Flow adaptation of Clojure `let`. Wraps evaluation of each binding to `call-with` with `*default-handler*`. If `fail?` value returned from binding evaluation, it's returned immediately and all other bindings and body are skipped. May use custom exception handler passed as first binding with name :handler
sourceraw docstring

ignore-exceptions!clj

(ignore-exceptions! ex-class-set)

Sets *ignored-exceptions* to given set of classes

Sets `*ignored-exceptions*` to given set of classes
sourceraw docstring

ignored?clj

(ignored? t)

Checks if exception should be ignored

Checks if exception should be ignored
sourceraw docstring

ignoringcljmacrodeprecated

(ignoring ignored-exceptions & body)

Executes body with *ignored-exceptions* bound to given value. Deprecated due to possible problems with multi-threaded code. Use call-with to achieve same behavior with thread-safety

Executes body with `*ignored-exceptions*` bound to given value.
Deprecated due to possible problems with multi-threaded code. Use `call-with` to achieve same behavior with thread-safety
sourceraw docstring

thenclj

(then f value)

If value is not a fail?, applies f to it, otherwise returns value

If value is not a `fail?`, applies f to it, otherwise returns value
sourceraw docstring

then-callclj

(then-call f value)

If value is not a fail?, applies f to it wrapped to call, otherwise returns value

If value is not a `fail?`, applies f to it wrapped to `call`, otherwise returns value
sourceraw docstring

thruclj

(thru f value)

Applies f to value (for side effects). Returns value. Works similar to doto, but accepts function as first arg

Applies f to value (for side effects). Returns value. Works similar to doto, but accepts function as first arg
sourceraw docstring

thru-callclj

(thru-call f value)

Applies f to value wrapped to call (for side effects). Returns value. Works similar to doto, but accepts function as first arg. Please not that exception thrown inside of function will be silently ignored by default

Applies f to value wrapped to call (for side effects). Returns value. Works similar to doto, but accepts function as first arg. Please not that exception thrown inside of function will be silently ignored by default
sourceraw docstring

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

× close