(make-exception title type {:keys [cause] :as details})
Construct an exception for use with throw using ex-info. If a body key is included in details, its will be rendered to underscores. If no body key is included, a body key will be added using {:error title} (affects external HTTP responses). If a cause key is included in details, it will be used as the cause for the exception and removed from details.
Construct an exception for use with throw using ex-info. If a body key is included in details, its will be rendered to underscores. If no body key is included, a body key will be added using {:error title} (affects external HTTP responses). If a cause key is included in details, it will be used as the cause for the exception and removed from details.
(terminate title type details)
Throw an internal format exception with a details map
Throw an internal format exception with a details map
(try-type & body)
Macro with support for catching (or explicitly not catching) exceptions thrown by functions in this namespace (e.g., ex/unauthorized!). Can function in one of two ways:
(try-type xxx (catch #{:unauthorized} data (prn data)))
(try-type xxx (catch-not #{:unauthorized} data (prn data)))
Note that the data
symbol above is bound to the ex-data of the exception, not the exception itself
Note that these do not compose at the moment - it's one or the other.Macro with support for catching (or explicitly not catching) exceptions thrown by functions in this namespace (e.g., ex/unauthorized!). Can function in one of two ways: * `(try-type xxx (catch #{:unauthorized} data (prn data)))` * `(try-type xxx (catch-not #{:unauthorized} data (prn data)))` Note that the `data` symbol above is bound to the ex-data of the exception, not the exception itself Note that these do not compose at the moment - it's one or the other.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close