Skip to content

Commit de36924

Browse files
committed
Log json error parsing
1 parent aa68573 commit de36924

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/eca/config.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
[clojure.core.memoize :as memoize]
1313
[clojure.java.io :as io]
1414
[clojure.string :as string]
15+
[eca.logger :as logger]
1516
[eca.shared :as shared])
1617
(:import
1718
[java.io File]))
@@ -75,8 +76,8 @@
7576
(binding [json.factory/*json-factory* (json.factory/make-json-factory
7677
{:allow-comments true})]
7778
(json/parse-string raw-string true))
78-
(catch Exception _
79-
nil)))
79+
(catch Exception e
80+
(logger/warn "Error parsing config json:" (.getMessage e)))))
8081

8182
(defn ^:private config-from-envvar* []
8283
(some-> (System/getenv "ECA_CONFIG")

src/eca/features/tools/editor.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
[eca.messenger :as messenger]
88
[eca.shared :as shared]))
99

10-
(defn ^:private diagnostics [arguments {:keys [messenger config]}]
10+
(defn ^:private diagnostics
11+
"Return editor diagnostics (e.g., LSP findings)."
12+
[arguments {:keys [messenger config]}]
1113
(or (tools.util/invalid-arguments arguments [["path" #(or (nil? %)
1214
(string/blank? %)
1315
(not (fs/directory? %))) "Path needs to be a file, not a directory."]])

0 commit comments

Comments
 (0)