Skip to content

Commit 1c39141

Browse files
committed
Raise error message on missing metadata
1 parent 3f2ded0 commit 1c39141

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/elixir/lib/module/parallel_checker.ex

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,19 @@ defmodule Module.ParallelChecker do
360360
defp fetch_module_map!(binary, module) when is_binary(binary) do
361361
{:ok, {_, [debug_info: chunk]}} = :beam_lib.chunks(binary, [:debug_info])
362362
{:debug_info_v1, backend, data} = chunk
363-
{:ok, module_map} = backend.debug_info(:elixir_v1, module, data, [])
364-
module_map
363+
364+
case backend.debug_info(:elixir_v1, module, data, []) do
365+
{:ok, module_map} ->
366+
module_map
367+
368+
{:error, error} ->
369+
raise """
370+
could not load Elixir metadata for module #{inspect(module)}, \
371+
written in backend #{inspect(backend)}, due to reason: #{inspect(error)}
372+
373+
Please report this bug: https://github.com/elixir-lang/elixir/issues
374+
"""
375+
end
365376
end
366377

367378
defp cache_from_module_map(ets, map) do

0 commit comments

Comments
 (0)