This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-22
Channels
- # aleph (5)
- # announcements (5)
- # babashka (8)
- # beginners (63)
- # biff (43)
- # calva (17)
- # clj-kondo (76)
- # clojure (105)
- # clojure-europe (77)
- # clojure-nl (1)
- # clojure-norway (40)
- # clojure-uk (4)
- # clojuredesign-podcast (20)
- # clojurescript (35)
- # clr (7)
- # cursive (5)
- # data-science (1)
- # datomic (41)
- # fulcro (14)
- # hyperfiddle (22)
- # malli (12)
- # off-topic (17)
- # re-frame (6)
- # reitit (3)
- # releases (1)
- # ring (2)
- # scittle (1)
- # shadow-cljs (6)
- # specter (3)
- # xtdb (3)
When an error occurs in a re-frame sub, it often crashes the app; e.g. a common one is we call (sort-by (comp str/lower-case :name) ,,,)
in a sub when sometimes it occurs that :name
is nil
.
often the stack trace will bottom out somewhere in clojure.core or re-frame, and not point at the particular subscription function which actually caused the crash.
anyone figured out a way to capture these errors in a way that links it back to the particular subscription that failed?
I see the component that ended up derefing that sub - that's pretty much always enough. Although I agree that seeing the sub itself would be more useful.
Ah, hold on - I see the component in a stacktrace made by React. The original stacktrace does show the exact location.
Clicking on the link navigates me to the exact line where I put a throw
. And I haven't made any special setup to make it work.