This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-03
Channels
- # announcements (2)
- # babashka (66)
- # beginners (225)
- # braveandtrue (1)
- # calva (14)
- # circleci (1)
- # clj-kondo (36)
- # cljsrn (3)
- # clojure (423)
- # clojure-finland (7)
- # clojure-nl (1)
- # clojure-spec (14)
- # clojure-survey (41)
- # clojure-sweden (2)
- # clojure-uk (13)
- # clojurescript (59)
- # community-development (10)
- # cursive (2)
- # datascript (14)
- # datomic (63)
- # events (3)
- # expound (8)
- # figwheel-main (6)
- # kaocha (8)
- # luminus (6)
- # malli (1)
- # nrepl (2)
- # off-topic (51)
- # other-lisps (3)
- # reagent (16)
- # shadow-cljs (44)
- # spacemacs (7)
- # sql (22)
- # vrac (1)
Found something interest, with target :browser
.
(defn foo [i]
(throw (ex-info "hello" {:a 1})))
I can't get a meaningful stacktrace for this code, but I can get one for this
(defn foo [i]
(throw (js/Error. "hello")))
This is the error for js/Error
main.js:2218 failed to load fullstack_explore.app.js Error
at Object.fullstack_explore$app$foo [as foo] (app.cljs:6)
at eval (app.cljs:8)
at eval (<anonymous>)
at Object.goog.globalEval (main.js:836)
at Object.env.evalLoad (main.js:2216)
at main.js:2396
And this is the error for ex-info
failed to load fullstack_explore.app.js #error {:message "", :data {}}
env.evalLoad @ main.js:2218
(anonymous) @ main.js:2396
I don't know why ex-info behaves that way. nothing I can control or shadow-cljs does to it.
I found this because I tried to use some spec, a library called speced.def
use ex-info for it's error.
The ExceptionInfo has a field for stacktrace, without devtools
you get found the key :stack
.
is that because ExceptionInfo should extends something to make it display correctly. But when the error raised, this haven't been done.
if you trigger the error during load then :loader-mode :script
is basically what other CLJS does
the "optimized" :loader-mode :eval
(the default) loads things differently and thus may change the stacktrace