mirror of
https://github.com/metosin/reitit.git
synced 2026-01-03 23:18:26 +00:00
ClojureScriptify Exceptions
This commit is contained in:
parent
7979c9de9d
commit
132240b422
1 changed files with 2 additions and 2 deletions
|
|
@ -172,10 +172,10 @@
|
|||
([request]
|
||||
(try
|
||||
(handler request)
|
||||
(catch Exception e
|
||||
(catch #?(:clj Exception :cljs js/Error) e
|
||||
(handle-coercion-exception e identity #(throw %)))))
|
||||
([request respond raise]
|
||||
(try
|
||||
(handler request respond (fn [e] (handle-coercion-exception e respond raise)))
|
||||
(catch Throwable e
|
||||
(catch #?(:clj Exception :cljs js/Error) e
|
||||
(handle-coercion-exception e respond raise))))))))}))
|
||||
|
|
|
|||
Loading…
Reference in a new issue