aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorJosé Valim <[email protected]>2018-09-08 10:23:49 -0700
committerJosé Valim <[email protected]>2019-03-08 12:18:56 +0100
commit0e6fdc32a1e66405faa08eb79fbc3e05e6fa0cf0 (patch)
tree995f859c4f1a310613f8cafc5c6b1f32acf6a4da /erts/emulator/beam/beam_load.c
parent4d1422e1d5423725bd5e72e1b1ac1d8c0804ea3a (diff)
downloadotp-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/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c2
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;