Liking cljdoc? Tell your friends :D

adl-support.core


*warn*clj

The idea here is to have a function with which to show warnings to the user, which can be dynamically bound. Any binding should be a function of one argument, which it should print, log, or otherwise display.

The idea here is to have a function with which to show warnings to the user,
which can be dynamically bound. Any binding should be a function of one
argument, which it should print, log, or otherwise display.
raw docstring

compose-exception-reasoncljmacro

(compose-exception-reason exception)
(compose-exception-reason exception intro)

Compose and return a sensible reason message for this exception.

Compose and return a sensible reason message for this `exception`.
raw docstring

compose-reason-and-logcljmacro

(compose-reason-and-log exception)
(compose-reason-and-log exception intro)

Compose a reason message for this exception, log it (with its stacktrace), and return the reason message.

Compose a reason message for this `exception`, log it (with its
stacktrace), and return the reason message.
raw docstring

do-or-log-and-return-reasoncljmacro

(do-or-log-and-return-reason form)

Clojure stacktraces are unreadable. We have to do better; evaluate this form in a try-catch block; return a map. If the evaluation succeeds, the map will have a key :result whose value is the result; otherwise it will have a key :error which will be bound to the most sensible error message we can construct. Additionally, log the exception

Clojure stacktraces are unreadable. We have to do better; evaluate
this `form` in a try-catch block; return a map. If the evaluation
succeeds, the map will have a key `:result` whose value is the result;
otherwise it will have a key `:error` which will be bound to the most
sensible error message we can construct. Additionally, log the exception
raw docstring

do-or-log-errorcljmacro

(do-or-log-error form
                 &
                 {:keys [message error-return]
                  :or {message (clojure.core/seq
                                 (clojure.core/concat
                                   (clojure.core/list (quote clojure.core/str))
                                   (clojure.core/list "A failure occurred in ")
                                   (clojure.core/list (list (quote quote)
                                                            form))))}})

Evaluate the supplied form in a try/catch block. If the keyword param :message is supplied, the value will be used as the log message; if the keyword param :error-return is supplied, the value will be returned if an exception is caught.

Evaluate the supplied `form` in a try/catch block. If the
keyword param `:message` is supplied, the value will be used
as the log message; if the keyword param `:error-return` is
supplied, the value will be returned if an exception is caught.
raw docstring

do-or-return-reasoncljmacro

(do-or-return-reason form)
(do-or-return-reason form intro)

Clojure stacktraces are unreadable. We have to do better; evaluate this form in a try-catch block; return a map. If the evaluation succeeds, the map will have a key :result whose value is the result; otherwise it will have a key :error which will be bound to the most sensible error message we can construct.

Clojure stacktraces are unreadable. We have to do better; evaluate
this `form` in a try-catch block; return a map. If the evaluation
succeeds, the map will have a key `:result` whose value is the result;
otherwise it will have a key `:error` which will be bound to the most
sensible error message we can construct.
raw docstring

do-or-warncljmacro

(do-or-warn form)
(do-or-warn form intro)

Evaluate this form; if any exception is thrown, show it to the user via the *warn* mechanism.

Evaluate this `form`; if any exception is thrown, show it to the user
via the `*warn*` mechanism.
raw docstring

do-or-warn-and-logcljmacro

(do-or-warn-and-log form)
(do-or-warn-and-log form intro)

Evaluate this form; if any exception is thrown, log the reason and show it to the user via the *warn* mechanism.

Evaluate this `form`; if any exception is thrown, log the reason and
show it to the user via the `*warn*` mechanism.
raw docstring

massage-paramsclj

Sending empty strings, or numbers as strings, to the database often isn't helpful. Massage these params and form-params to eliminate these problems. We must take key field values out of just params, but we should take all other values out of form-params - because we need the key to load the form in the first place, but just accepting values of other params would allow spoofing.

Sending empty strings, or numbers as strings, to the database often isn't
helpful. Massage these `params` and `form-params` to eliminate these problems.
We must take key field values out of just params, but we should take all other
values out of form-params - because we need the key to load the form in
the first place, but just accepting values of other params would allow spoofing.
raw docstring

massage-valueclj

(massage-value k m)

Return a map with one key, this k as a keyword, whose value is the binding of k in map m, as read by read.

Return a map with one key, this `k` as a keyword, whose value is the binding of
`k` in map `m`, as read by read.
raw docstring

raw-massage-paramsclj

(raw-massage-params request)
(raw-massage-params request entity)

Sending empty strings, or numbers as strings, to the database often isn't helpful. Massage these params and form-params to eliminate these problems. Date and time fields also need massaging.

Sending empty strings, or numbers as strings, to the database often isn't
helpful. Massage these `params` and `form-params` to eliminate these problems.
Date and time fields also need massaging.
raw docstring

raw-resolve-templateclj

(raw-resolve-template n)

resolve-templateclj

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

× close