This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-19
Channels
- # adventofcode (52)
- # babashka (47)
- # beginners (13)
- # clojure (36)
- # clojure-belgium (1)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojurescript (2)
- # clojutre (9)
- # cursive (12)
- # datomic (3)
- # deps-new (3)
- # emacs (12)
- # fulcro (5)
- # guix (1)
- # honeysql (7)
- # introduce-yourself (1)
- # jobs (1)
- # kaocha (8)
- # lsp (5)
- # membrane (5)
- # mount (7)
- # nbb (5)
- # nrepl (2)
- # off-topic (60)
- # polylith (9)
- # reclojure (2)
- # reitit (8)
- # ring (17)
- # shadow-cljs (4)
- # spacemacs (31)
- # sql (7)
- # timbre (3)
- # xtdb (15)
Is there a way to get line numbers in error messages? All I'm seeing is this:
----- Error --------------------------------------
Type: SyntaxError
Message: Unexpected token u in JSON at position 0
Unexpected token u in JSON at position 0
I'm working in this p/let
block
(p/let [content (fs/readFile credentials-path (fn [r] r))
keys (try (js/JSON.parse content) (catch js/Error _ (js/console.log "this is where it breaks"))))
and have narrowed down the error to the JSON.parse
. So not necessary to get line no's in this particular case. I think metadata for functions supports line #s though, right? in JVM Clojure at least.Normally you get a line number but in async code this often gets lost in nbb. Could make an issue to see if something can be done about it
Yeah, I'll tinker with this. CLJS is not a strong suit of mine so I'd like to figure this out for this little script and then I can put the issue in if you like.
👍 1