From 43811f5c366c264210db9bfb1ba587c783c9184e Mon Sep 17 00:00:00 2001 From: Lukasz Samson Date: Fri, 13 Nov 2020 12:41:45 +0100 Subject: [PATCH] Rescue all exceptions in SourceFile.formatter_opts Fixes #401 --- apps/language_server/lib/language_server/source_file.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/language_server/lib/language_server/source_file.ex b/apps/language_server/lib/language_server/source_file.ex index 22d0d45d..4371a18f 100644 --- a/apps/language_server/lib/language_server/source_file.ex +++ b/apps/language_server/lib/language_server/source_file.ex @@ -222,8 +222,8 @@ defmodule ElixirLS.LanguageServer.SourceFile do {:ok, opts} rescue - e in Mix.Error -> - IO.warn("Unable to get formatter options for #{path}: #{e.message}") + e -> + IO.warn("Unable to get formatter options for #{path}: #{inspect(e.__struct__)} #{e.message}") :error end end