Actually remove log-ex. Commented out in last release.
This commit is contained in:
parent
cc1c32301b
commit
9b64df912d
|
@ -36,28 +36,6 @@
|
||||||
(reset! app-db new-db)))))))
|
(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
|
(defn debug
|
||||||
"Middleware which logs debug information to js/console for each event.
|
"Middleware which logs debug information to js/console for each event.
|
||||||
|
|
Loading…
Reference in New Issue