Skip to content

Commit

Permalink
log REPL errors as warnings
Browse files Browse the repository at this point in the history
really difficult to trace reported REPL exceptions currently
  • Loading branch information
thheller committed Apr 26, 2020
1 parent 92d4dcb commit ede401f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/shadow/cljs/devtools/server/worker/impl.clj
Expand Up @@ -96,8 +96,8 @@
{:type :build-message
:msg msg}))

(defn repl-error [e]
(log/debug-ex e ::repl-error)
(defn repl-error [e data]
(log/warn-ex e ::repl-error data)
{:type :repl/error
:ex e})

Expand Down Expand Up @@ -759,7 +759,7 @@
(pop-repl-state session-id)))

(catch Exception e
(let [msg (repl-error e)]
(let [msg (repl-error e {:when ::session-eval :msg msg})]
(>!! tool-out msg)
(>!!output worker-state msg))
worker-state)))))
Expand Down Expand Up @@ -906,7 +906,7 @@
new-actions)))

(catch Exception e
(let [msg (repl-error e)]
(let [msg (repl-error e {:when ::do-repl-rpc :command command :msg msg})]
(>!! result-chan msg)
(>!!output worker-state msg))
worker-state)))))
Expand Down

0 comments on commit ede401f

Please sign in to comment.