summaryrefslogtreecommitdiff
path: root/lib/tools/doc/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2021-02-11 15:26:25 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2021-02-19 07:22:05 +0100
commitfba5a42890990a01aca764750ebb6a4913cbc24c (patch)
tree7f95429b1f426dc079c08243f9a3ee4420af94ae /lib/tools/doc/src
parentca0fe0bc549549011de2a0dc7799db1a174a64f0 (diff)
downloaderlang-fba5a42890990a01aca764750ebb6a4913cbc24c.tar.gz
beam_lib, cover: Don't crash when an abstract code backend is missing
On a computer without Elixir installed, `beam_lib` would crash when asked to retrieve the abstract code for a BEAM file produced by the Elixir compiler. Instead of crashing when the backend module is missing, return `{error,{missing_backend,BeamFile,Backend}}`. Also update `cover` to handle the new error from `beam_lib`. Resolves #4353
Diffstat (limited to 'lib/tools/doc/src')
-rw-r--r--lib/tools/doc/src/cover.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tools/doc/src/cover.xml b/lib/tools/doc/src/cover.xml
index 8073bfc528..0889a16f65 100644
--- a/lib/tools/doc/src/cover.xml
+++ b/lib/tools/doc/src/cover.xml
@@ -217,9 +217,10 @@
<v>ModFiles = ModFile | [ModFile]</v>
<v>ModFile = Module | BeamFile</v>
<v>&nbsp;Module = atom()</v>
+ <v>&nbsp;BackendModule = atom()</v>
<v>&nbsp;BeamFile = string()</v>
<v>Result = {ok,Module} | {error,BeamFile} | {error,Reason}</v>
- <v>&nbsp;Reason = non_existing | {no_abstract_code,BeamFile} | {encrypted_abstract_code,BeamFile} | {already_cover_compiled,no_beam_found,Module} | not_main_node</v>
+ <v>&nbsp;Reason = non_existing | {no_abstract_code,BeamFile} | {{missing_backend,BackendModule},BeamFile} | {encrypted_abstract_code,BeamFile} | {already_cover_compiled,no_beam_found,Module} | not_main_node</v>
</type>
<desc>
<p>Does the same as <c>compile/1,2</c>, but uses an existing