Skip to content

Commit 43811f5

Browse files
committed
Rescue all exceptions in SourceFile.formatter_opts
Fixes #401
1 parent 51791ef commit 43811f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/language_server/lib/language_server/source_file.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ defmodule ElixirLS.LanguageServer.SourceFile do
222222

223223
{:ok, opts}
224224
rescue
225-
e in Mix.Error ->
226-
IO.warn("Unable to get formatter options for #{path}: #{e.message}")
225+
e ->
226+
IO.warn("Unable to get formatter options for #{path}: #{inspect(e.__struct__)} #{e.message}")
227227
:error
228228
end
229229
end

0 commit comments

Comments
 (0)