Liking cljdoc? Tell your friends :D

slingshot.support


*catch-hook*clj

Hook to allow overriding the behavior of catch. Must be bound to a function of one argument, a context map. Returns a (possibly modified) context map to be considered by catch clauses.

Normal processing by catch clauses can be skipped by adding special keys to the context map:

If the context contains the key:

  • :catch-hook-return, try+ will return the corresponding value;
  • :catch-hook-throw, try+ will throw+ the corresponding value;
  • :catch-hook-rethrow, try+ will rethrow the caught object's outermost wrapper.

Defaults to identity.

Hook to allow overriding the behavior of catch. Must be
bound to a function of one argument, a context map. Returns
a (possibly modified) context map to be considered by catch clauses.

Normal processing by catch clauses can be skipped by adding special
keys to the context map:

If the context contains the key:
  - :catch-hook-return, try+ will return the corresponding value;
  - :catch-hook-throw, try+ will throw+ the corresponding value;
  - :catch-hook-rethrow, try+ will rethrow the caught object's
    outermost wrapper.

Defaults to identity.
raw docstring

*throw-hook*clj

Hook to allow overriding the behavior of throw+. Must be bound to a function of one argument, a context map. Defaults to default-throw-hook.

Hook to allow overriding the behavior of throw+. Must be
bound to a function of one argument, a context map. Defaults to
default-throw-hook.
raw docstring

appears-within?clj

(appears-within? x coll)

Returns true if x appears within coll at any nesting depth

Returns true if x appears within coll at any nesting depth
raw docstring

default-throw-hookclj

(default-throw-hook context)

Default implementation of throw-hook

Default implementation of *throw-hook*
raw docstring

environmentcljmacro

(environment)

Expands to code that generates a map of locals: names to values

Expands to code that generates a map of locals: names to values
raw docstring

ex-classclj


ex-dataclj


ex-infoclj


ex-info-nsclj


get-contextclj

(get-context t)

Returns a context given a Throwable t. If t or any Throwable in its cause chain is a context wrapper, returns the context with the wrapper assoc'd as the value for :wrapper and t assoc'd as the value for :throwable. Otherwise creates a new context based on t with t assoc'd as the value for :throwable.

Returns a context given a Throwable t. If t or any Throwable in its
cause chain is a context wrapper, returns the context with the
wrapper assoc'd as the value for :wrapper and t assoc'd as the value
for :throwable. Otherwise creates a new context based on t with t
assoc'd as the value for :throwable.
raw docstring

get-throwableclj

(get-throwable {object :object :as context})

Returns a Throwable given a context: the object in context if it's a Throwable, else a Throwable context wrapper

Returns a Throwable given a context: the object in context if it's
a Throwable, else a Throwable context wrapper
raw docstring

make-contextclj

(make-context t)
(make-context object message stack-trace environment)

Makes a throw context from arguments. Captures the cause from the environment argument if present.

Makes a throw context from arguments. Captures the cause from the
environment argument if present.
raw docstring

parse-try+clj

(parse-try+ body)

Returns a vector of seqs containing the expressions, catch clauses, and finally clauses in a try+ body, or throws if the body's structure is invalid

Returns a vector of seqs containing the expressions, catch clauses,
and finally clauses in a try+ body, or throws if the body's structure
is invalid
raw docstring

rethrowcljmacro

(rethrow)

Within a try+ catch clause, throws the outermost wrapper of the caught object

Within a try+ catch clause, throws the outermost wrapper of the
caught object
raw docstring

stack-traceclj

(stack-trace)

Returns the current stack trace beginning at the caller's frame

Returns the current stack trace beginning at the caller's frame
raw docstring

throw-argclj

(throw-arg fmt & args)

Throws an IllegalArgumentException with a message given arguments for clojure.core/format

Throws an IllegalArgumentException with a message given arguments
for clojure.core/format
raw docstring

throw-contextclj

(throw-context object message stack-trace environment)

Throws a context. Allows overrides of throw-hook to intervene.

Throws a context. Allows overrides of *throw-hook* to intervene.
raw docstring

transform-catchclj

(transform-catch catch-clauses throw-sym)

Transforms a seq of catch clauses for try+ into a seq of one catch clause for try that implements the specified behavior. throw-sym names a macro or function (usually throw+) that can accept zero or one arguments. It is called with one argument for :catch-hook-throw requests, or zero arguments for :catch-hook-rethrow requests or when no try+ catch clause matches.

Transforms a seq of catch clauses for try+ into a seq of one catch
clause for try that implements the specified behavior. throw-sym
names a macro or function (usually throw+) that can accept zero or
one arguments. It is called with one argument for :catch-hook-throw
requests, or zero arguments for :catch-hook-rethrow requests or when
no try+ catch clause matches.
raw docstring

unwrapclj

(unwrap t)

If t is a context wrapper, returns the context with t assoc'd as the value for :wrapper, else returns nil

If t is a context wrapper, returns the context with t assoc'd as
the value for :wrapper, else returns nil
raw docstring

unwrap-allclj

(unwrap-all t)

Searches Throwable t and its cause chain for a context wrapper. If one is found, returns the context with the wrapper assoc'd as the value for :wrapper, else returns nil.

Searches Throwable t and its cause chain for a context wrapper. If
one is found, returns the context with the wrapper assoc'd as the
value for :wrapper, else returns nil.
raw docstring

wrapclj

(wrap context)

Returns a context wrapper given a context

Returns a context wrapper given a context
raw docstring

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

× close