Wrap an app such that exceptions thrown within the wrapped app are caught
and a helpful debugging response is returned.
(defn wrap-stacktrace
"Wrap an app such that exceptions thrown within the wrapped app are caught
and a helpful debugging response is returned."
[app]
(fn [req]
(try
(app req)
(catch Exception e
(ex-response req e)))))
Comments top
No comments for wrap-stacktrace. Log in to add a comment.