Liking cljdoc? Tell your friends :D

promenade.util

Utility functions for using Promenade effectively

Utility functions for using Promenade effectively
raw docstring

!se-infoclj/smacro

(!se-info expr)

Evaluate given form and return the result; on promenade.util.StacklessExceptionInfo return the exception as a thrown context.

See: promenade.core/!, se-info, se-info?, !wrap-se-info

Evaluate given form and return the result; on `promenade.util.StacklessExceptionInfo` return the exception as a
thrown context.

See: [[promenade.core/!]], [[se-info]], [[se-info?]], [[!wrap-se-info]]
sourceraw docstring

!wrap-se-infoclj/smacro

(!wrap-se-info f)

Wrap given function such that on promenade.util.StacklessExceptionInfo it returns the exception as a thrown context.

See: promenade.core/!wrap, se-info, se-info?, !se-info

Wrap given function such that on `promenade.util.StacklessExceptionInfo` it returns the exception as a thrown
context.

See: [[promenade.core/!wrap]], [[se-info]], [[se-info?]], [[!se-info]]
sourceraw docstring

defailureclj/smacro

(defailure the-name fields & more)

Define a failure entity and corresponding instance type predicate function.

Define a failure entity and corresponding instance type predicate function.
sourceraw docstring

defentityclj/smacro

(defentity the-name)
(defentity the-name fields & more)

Define entity record and corresponding instance type predicate function. If fields are unspecified, assume single field value. Examples:

(defentity ProductCode)  ; create record ProductCode with single field 'value', and predicate fn ProductCode?
(defentity Approval [by when])  ; create record Approval with fields `by` and `when`, and predicate Approval?

See: defailure

Define entity record and corresponding instance type predicate function. If fields are unspecified, assume single
field `value`.
Examples:
```
(defentity ProductCode)  ; create record ProductCode with single field 'value', and predicate fn ProductCode?
(defentity Approval [by when])  ; create record Approval with fields `by` and `when`, and predicate Approval?
```
See: [[defailure]]
sourceraw docstring

se-infoclj/s

(se-info msg)
(se-info msg data)

Like clojure.core/ex-info, but with the following differences:

promenade.util/se-infoclojure.core/ex-info, cljs.core/ex-info
no stack trace or cause supportfull support for stack trace and cause
much faster and lightweightsame cost model as regular exceptions
meant for flow control, not debuggingmeant for debugging and flow control
uses promenade.util.StacklessExceptionInfouses (clojure.lang|cljs.core).ExceptionInfo

You may use clojure.core/ex-data or cljs.core/ex-data on this exception to retrieve the data.

See: se-info?, !se-info, !wrap-se-info

Like `clojure.core/ex-info`, but with the following differences:

| `promenade.util/se-info`                     | `clojure.core/ex-info`, `cljs.core/ex-info`   |
|----------------------------------------------|-----------------------------------------------|
| no stack trace or cause support              | full support for stack trace and cause        |
| much faster and lightweight                  | same cost model as regular exceptions         |
| meant for flow control, not debugging        | meant for debugging and flow control          |
| uses `promenade.util.StacklessExceptionInfo` | uses `(clojure.lang|cljs.core).ExceptionInfo` |

You may use `clojure.core/ex-data` or `cljs.core/ex-data` on this exception to retrieve the data.

See: [[se-info?]], [[!se-info]], [[!wrap-se-info]]
sourceraw docstring

se-info?clj/s

(se-info? x)

Return true if argument is an instance of StacklessExceptionInfo, false otherwise.

See: se-info, !se-info, !wrap-se-info

Return `true` if argument is an instance of `StacklessExceptionInfo`, `false` otherwise.

See: [[se-info]], [[!se-info]], [[!wrap-se-info]]
sourceraw docstring

StacklessExceptionInfocljs

(StacklessExceptionInfo message data)
source

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

× close