Surface all errors: wrap event handlers in try/catch with console.error
- domAddListener wraps callbacks so exceptions always log to console - Add "sx:route trying <url>" log before tryClientRoute call - Remove redundant bind-event fired log (replaced with route-specific logs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -373,7 +373,6 @@
|
||||
(when listen-target
|
||||
(dom-add-listener listen-target event-name
|
||||
(fn (e)
|
||||
(log-info (str "sx:bind-event fired: " event-name " on " (dom-tag-name el)))
|
||||
(let ((should-fire true))
|
||||
;; Changed modifier: skip if value unchanged
|
||||
(when (get mods "changed")
|
||||
@@ -396,6 +395,7 @@
|
||||
(not (get mods "delay"))))
|
||||
(client-routed false))
|
||||
(when is-get-link
|
||||
(log-info (str "sx:route trying " (get verbInfo "url")))
|
||||
(set! client-routed
|
||||
(try-client-route (url-pathname (get verbInfo "url")))))
|
||||
(if client-routed
|
||||
|
||||
Reference in New Issue
Block a user