diff options
author | José Valim <[email protected]> | 2018-09-08 10:23:49 -0700 |
---|---|---|
committer | José Valim <[email protected]> | 2019-03-08 12:18:56 +0100 |
commit | 0e6fdc32a1e66405faa08eb79fbc3e05e6fa0cf0 (patch) | |
tree | 995f859c4f1a310613f8cafc5c6b1f32acf6a4da /erts/emulator/beam | |
parent | 4d1422e1d5423725bd5e72e1b1ac1d8c0804ea3a (diff) | |
download | otp-0e6fdc32a1e66405faa08eb79fbc3e05e6fa0cf0.tar.gz otp-0e6fdc32a1e66405faa08eb79fbc3e05e6fa0cf0.tar.bz2 otp-0e6fdc32a1e66405faa08eb79fbc3e05e6fa0cf0.zip |
Clarify beam_load error message on file/module mismatch
This is particularly important in case insensitive filesystems,
where attempting to invoke a module with the wrong case leads
to confusing error messages:
1> erlpress_core:foo().
beam/beam_load.c(1428): Error loading module 'erlpress_core':
module name in object code is erlPress_core
Loading of erlPress_core.beam failed: :badfile
This commit replaces object code by BEAM file and improves
the readability of the message.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index 50cbb37f3e..d8cf3fb8e2 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -1425,7 +1425,7 @@ load_atom_table(LoaderState* stp, ErtsAtomEncoding enc) ap = atom_tab(atom_val(stp->atom[1])); sys_memcpy(sbuf, ap->name, ap->len); sbuf[ap->len] = '\0'; - LoadError1(stp, "module name in object code is %s", sbuf); + LoadError1(stp, "BEAM file exists but it defines a module named %s", sbuf); } return 1; |