Actually remove log-ex. Commented out in last release.

This commit is contained in:
Mike Thompson 2016-03-15 20:08:25 +11:00
parent cc1c32301b
commit 9b64df912d
1 changed files with 0 additions and 22 deletions

View File

@ -36,28 +36,6 @@
(reset! app-db new-db)))))))
;; no longer needed
#_(defn log-ex
"Middleware which catches and prints any handler-generated exceptions to console.
Handlers are called from within a core.async go-loop, and core.async produces
a special kind of hell when in comes to stacktraces. By the time an exception
has passed through a go-loop its stack is mangled beyond repair and you'll
have no idea where the exception was thrown.
So this middleware catches and prints to stacktrace before the core.async sausage
machine has done its work.
"
[handler]
(fn log-ex-handler
[db v]
(warn "re-frame: use of \"log-ex\" is deprecated. You don't need it any more IF YOU ARE USING CHROME 44. Chrome now seems to now produce good stack traces.")
(try
(handler db v)
(catch :default e ;; ooops, handler threw
(do
(.error js/console (.-stack e))
(throw e))))))
(defn debug
"Middleware which logs debug information to js/console for each event.