Use catch :default for default error handling in cljs

This is considered normal practice for cljs. See
https://clojure.atlassian.net/browse/CLJS-661 for when it was introduced
and background on it
This commit is contained in:
Gabriel Horner
2022-09-22 10:19:35 -04:00
committed by Tienson Qin
parent ae114afbd8
commit 2ce6dfad41
49 changed files with 82 additions and 82 deletions

View File

@@ -1209,7 +1209,7 @@
f (sci/eval-string fn-string)]
(when (fn? f)
(try (f query-result)
(catch js/Error e
(catch :default e
(js/console.error e)))))))
[:span.warning
(util/format "{{function %s}}" (first arguments))]))
@@ -2814,7 +2814,7 @@
:colgroup
(repeat number col-elem))))
col_groups)
(catch js/Error _e
(catch :default _e
[]))
head (when header
[:thead (tr :th header)])
@@ -3042,7 +3042,7 @@
(and (seq result) view-f)
(let [result (try
(sci/call-fn view-f result)
(catch js/Error error
(catch :default error
(log/error :custom-view-failed {:error error
:result result})
[:div "Custom view failed: "
@@ -3318,7 +3318,7 @@
:else
"")
(catch js/Error e
(catch :default e
(println "Convert to html failed, error: " e)
"")))