mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
Document spec-tools change + cause reasoning
This commit is contained in:
parent
161fd1dfb0
commit
76b90d3598
2 changed files with 2 additions and 0 deletions
|
|
@ -15,6 +15,7 @@
|
|||
* [over 40% faster](https://metosin.github.io/reitit/performance.html) on the JVM
|
||||
|
||||
* **BREAKING**: `reitit.spec/validate-spec!` has been renamed to `validate`
|
||||
* With `clojure.spec` coercion, values flow through both `st/coerce` & `st/conform` yielding better error messages. Original issue in [compojure-api](https://github.com/metosin/compojure-api/issues/409).
|
||||
|
||||
### `reitit-dev`
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
(defn exception [e]
|
||||
(let [data (ex-data e)
|
||||
message (format-exception (:type data) #?(:clj (.getMessage ^Exception e) :cljs (ex-message e)) (:data data))]
|
||||
;; there is a 3-arity version (+cause) of ex-info, but the default repl error message is taken from the cause
|
||||
(ex-info message (assoc (or data {}) ::cause e))))
|
||||
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue