From 132240b422e5b18a2aa9837353a5c76f810d5ac6 Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Sun, 26 Nov 2017 22:04:51 +0200 Subject: [PATCH] ClojureScriptify Exceptions --- modules/reitit-ring/src/reitit/ring/coercion.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/reitit-ring/src/reitit/ring/coercion.cljc b/modules/reitit-ring/src/reitit/ring/coercion.cljc index 41c98627..295ba4de 100644 --- a/modules/reitit-ring/src/reitit/ring/coercion.cljc +++ b/modules/reitit-ring/src/reitit/ring/coercion.cljc @@ -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))))))))}))