Skip to content

Commit c154835

Browse files
committed
catch beam exceptions when unable to load docs
1 parent bfefb1f commit c154835

File tree

1 file changed

+8
-0
lines changed
  • lib/elixir_sense/core/normalized

1 file changed

+8
-0
lines changed

lib/elixir_sense/core/normalized/code.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ defmodule ElixirSense.Core.Normalized.Code do
66
alias ElixirSense.Core.Behaviours
77
alias ElixirSense.Core.ErlangHtml
88
alias ElixirSense.Core.Normalized.Path, as: PathNormalized
9+
require Logger
910

1011
@type doc_t :: nil | false | String.t()
1112
@type fun_doc_entry_t ::
@@ -305,6 +306,13 @@ defmodule ElixirSense.Core.Normalized.Code do
305306
else
306307
_ -> :error
307308
end
309+
catch
310+
kind, reason ->
311+
Logger.warning(
312+
"Failed to fetch docs for #{inspect(module)}: #{Exception.format(kind, reason, __STACKTRACE__)}"
313+
)
314+
315+
:error
308316
end
309317

310318
@docs_chunk [?D, ?o, ?c, ?s]

0 commit comments

Comments
 (0)