mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 07:05:10 +00:00
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:
committed by
Tienson Qin
parent
ae114afbd8
commit
2ce6dfad41
@@ -35,7 +35,7 @@
|
||||
[type & args]
|
||||
(try
|
||||
(apply js-invoke (aget js/window.logseq "api") type args)
|
||||
(catch js/Error e (js/console.error e))))
|
||||
(catch :default e (js/console.error e))))
|
||||
|
||||
;; state handlers
|
||||
(defonce central-endpoint "https://raw.githubusercontent.com/logseq/marketplace/master/")
|
||||
@@ -153,7 +153,7 @@
|
||||
[id]
|
||||
(try
|
||||
(js/LSPluginCore.ensurePlugin (name id))
|
||||
(catch js/Error _e
|
||||
(catch :default _e
|
||||
nil)))
|
||||
|
||||
(defn open-updates-downloading
|
||||
@@ -431,7 +431,7 @@
|
||||
matched)))
|
||||
content)]
|
||||
(format/to-html content :markdown (gp-mldoc/default-config :markdown))))
|
||||
(catch js/Error e
|
||||
(catch :default e
|
||||
(log/error :parse-user-md-exception e)
|
||||
content)))
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
(bean/->js (normalize-keyword-for-json payload))
|
||||
payload)
|
||||
(if (keyword? plugin-id) (name plugin-id) plugin-id))
|
||||
(catch js/Error e
|
||||
(catch :default e
|
||||
(js/console.error "[Hook Plugin Err]" e)))))
|
||||
|
||||
(defn hook-plugin-app
|
||||
|
||||
Reference in New Issue
Block a user