Many improvements on error reporting.

This commit is contained in:
Andrey Antukh 2020-12-21 09:46:27 +01:00 committed by Alonso Torres
parent 0f37c8ecbd
commit b7353db14e
5 changed files with 99 additions and 88 deletions

View file

@ -242,11 +242,15 @@
(st/emit! (rt/nav :login))
(ts/schedule
(st/emitf (dm/show {:content "Not authorized to see this content."
:timeout 5000
:timeout 3000
:type :error}))))
(defmethod ptk/handle-error :assertion
[{:keys [data stack message context] :as error}]
(ts/schedule
(st/emitf (dm/show {:content "Internal assertion error."
:type :error
:timeout 2000})))
(js/console.group message)
(js/console.info (str/format "ns: '%s'\nname: '%s'\nfile: '%s:%s'"
(:ns context)