Liking cljdoc? Tell your friends :D

exoscale.ex


ancestorsclj

(ancestors tag)

Like clojure.core/ancestors but scoped on our ex-info type hierarchy

Like clojure.core/ancestors but scoped on our ex-info type hierarchy
sourceraw docstring

assert-spec-validclj

(assert-spec-valid spex x)
(assert-spec-valid spec x data)

Asserts that x conforms to spec, otherwise throws with ex-invalid-spec

Asserts that `x` conforms to `spec`, otherwise throws with
`ex-invalid-spec`
sourceraw docstring

catchclj

(catch e type-key handler continue)

catch-data as a function, takes an exception, tries to match it against type-key from its ex-data.type, on match returns call to handler with the ex-data, otherwise continue with the original exception.

catch-data as a function, takes an exception, tries to match it
against `type-key` from its ex-data.type, on match returns call to
`handler` with the ex-data, otherwise `continue` with the original
exception.
sourceraw docstring

deriveclj

(derive tag parent)

Like clojure.core/derive but scoped on our ex-info type hierarchy

Like clojure.core/derive but scoped on our ex-info type hierarchy
sourceraw docstring

descendantsclj

(descendants tag)

Like clojure.core/descendants but scoped on our ex-info type hierarchy

Like clojure.core/descendants but scoped on our ex-info type hierarchy
sourceraw docstring

ex-busyclj

(ex-busy msg)
(ex-busy msg data)
(ex-busy msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/busy. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/busy. Rest of the arguments match `ex-info`
sourceraw docstring

ex-conflictclj

(ex-conflict msg)
(ex-conflict msg data)
(ex-conflict msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/conflict. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/conflict. Rest of the arguments match `ex-info`
sourceraw docstring

ex-faultclj

(ex-fault msg)
(ex-fault msg data)
(ex-fault msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/fault. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/fault. Rest of the arguments match `ex-info`
sourceraw docstring

ex-forbiddenclj

(ex-forbidden msg)
(ex-forbidden msg data)
(ex-forbidden msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/forbidden. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/forbidden. Rest of the arguments match `ex-info`
sourceraw docstring

ex-incorrectclj

(ex-incorrect msg)
(ex-incorrect msg data)
(ex-incorrect msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/incorrect. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/incorrect. Rest of the arguments match `ex-info`
sourceraw docstring

ex-infoclj

(ex-info msg type)
(ex-info msg type data)
(ex-info msg type data cause)

Like clojure.core/ex-info but adds validation of the ex-data, automatic setting of the data :type from argument and potential derivation. You can specify type as either a keyword or a tuple of [<type> [<derivation>+]].

Like `clojure.core/ex-info` but adds validation of the ex-data,
automatic setting of the data `:type` from argument and potential
derivation. You can specify type as either a keyword or a tuple of
`[<type> [<derivation>+]]`.
sourceraw docstring

ex-interruptedclj

(ex-interrupted msg)
(ex-interrupted msg data)
(ex-interrupted msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/interrupted. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/interrupted. Rest of the arguments match `ex-info`
sourceraw docstring

ex-invalid-specclj

(ex-invalid-spec spec x)
(ex-invalid-spec spec x data)

Returns an ex-info when value x does not conform to spec spex

Returns an ex-info when value `x` does not conform to spec `spex`
sourceraw docstring

ex-not-foundclj

(ex-not-found msg)
(ex-not-found msg data)
(ex-not-found msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/not-found. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/not-found. Rest of the arguments match `ex-info`
sourceraw docstring

ex-unavailableclj

(ex-unavailable msg)
(ex-unavailable msg data)
(ex-unavailable msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/unavailable. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/unavailable. Rest of the arguments match `ex-info`
sourceraw docstring

ex-unsupportedclj

(ex-unsupported msg)
(ex-unsupported msg data)
(ex-unsupported msg data cause)

Returns an ex-info with ex-data :type set to :exoscale.ex/unsupported. Rest of the arguments match ex-info

Returns an ex-info with ex-data `:type` set to :exoscale.ex/unsupported. Rest of the arguments match `ex-info`
sourceraw docstring

hierarchyclj

source

isa?clj

(isa? child parent)

Like clojure.core/isa? but scoped on our ex-info type hierarchy

Like clojure.core/isa? but scoped on our ex-info type hierarchy
sourceraw docstring

map->ex-infoclj

(map->ex-info m)
(map->ex-info {:exoscale.ex/keys [message type deriving data cause]}
              {:exoscale.ex/keys [derive?] :or {derive? false}})

Turns a datafy'ied ex/ex-info into an ex-info

Turns a datafy'ied ex/ex-info into an ex-info
sourceraw docstring

parentsclj

(parents tag)

Like clojure.core/parents but scoped on our ex-info type hierarchy

Like clojure.core/parents but scoped on our ex-info type hierarchy
sourceraw docstring

set-ex-data-spec!clj

(set-ex-data-spec! type spec)
source

set-validator!clj

(set-validator! f)

Sets validation failure handler globally

Sets validation failure handler globally
sourceraw docstring

try+cljmacro

(try+ & xs)

Like try but with support for ex-info/ex-data.

If you pass a catch-data form it will try to match an ex-info :type key, or it's potential ancestors in the local hierarchy.

ex-info clauses are checked first, in the order they were specified. catch-data will take as arguments a :type key, and a binding for the ex-data of the ex-info instance.

(try [...] (catch ::something my-ex-data (do-something my-ex-info)) (catch ::something-else {:as my-ex-data :keys [foo bar]} (do-something foo bar)) (catch Exception e (do-something e)) (catch OtherException e (do-something e)) (finally :and-done))

You can specify normal catch clauses for regular java errors and/or finally these are left untouched.

Like try but with support for ex-info/ex-data.

If you pass a `catch-data` form it will try to match an
ex-info :type key, or it's potential ancestors in the local hierarchy.

ex-info clauses are checked first, in the order they were specified.
catch-data will take as arguments a :type key, and a binding for
the ex-data of the ex-info instance.

(try
  [...]
  (catch ::something my-ex-data
    (do-something my-ex-info))
  (catch ::something-else {:as my-ex-data :keys [foo bar]}
    (do-something foo bar))
  (catch Exception e
    (do-something e))
  (catch OtherException e
    (do-something e))
  (finally :and-done))

You can specify normal catch clauses for regular java errors and/or
finally these are left untouched.
sourceraw docstring

type?clj

(type? ex t)

Returns true if ex is an ex-info with descendant/type of type

Returns true if `ex` is an ex-info with descendant/type of `type`
sourceraw docstring

typesclj

source

underiveclj

(underive tag parent)

Like clojure.core/underive but scoped on our ex-info type hierarchy

Like clojure.core/underive but scoped on our ex-info type hierarchy
sourceraw docstring

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

× close