Update ring-devel/src/ring/middleware/stacktrace.clj #80

Closed
wants to merge 1 commit into
from

Update ring-devel/src/ring/middleware/stacktrace.clj

Catch all Throwaables, not just Exceptions, so that (assert ...) works inside handlers.
commit 0ca56f1fae31f5534a7c06a93e453dd7acda6557 @jcromartie jcromartie committed Feb 26, 2013
View
4 ring-devel/src/ring/middleware/stacktrace.clj
@@ -13,7 +13,7 @@
(fn [request]
(try
(handler request)
- (catch Exception ex
+ (catch Throwable ex
(let [msg (str "Exception: " (pst-str ex))]
(.println *err* msg)
(throw ex))))))
@@ -77,7 +77,7 @@
(fn [request]
(try
(handler request)
- (catch Exception ex
+ (catch Throwable ex
(ex-response request ex)))))
(defn wrap-stacktrace