aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-06-27 17:08:26 +0200
committerSverker Eriksson <[email protected]>2017-06-27 17:08:26 +0200
commit86bcdcb3db79ac2d1faa387bbe194924e966dd69 (patch)
treeb0f2e3e7fbbe0b661276667ddb75f75a6456f203 /erts/emulator/beam/beam_emu.c
parent040bdce67f88d833bfb59adae130a4ffb4c180f0 (diff)
downloadotp-86bcdcb3db79ac2d1faa387bbe194924e966dd69.tar.gz
otp-86bcdcb3db79ac2d1faa387bbe194924e966dd69.tar.bz2
otp-86bcdcb3db79ac2d1faa387bbe194924e966dd69.zip
erts: Make apply throw 'badarg' if Args is not a list
instead of a strange 'undef' exception.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 79d751d13e..bc83699951 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -6829,7 +6829,7 @@ apply_fun(Process* p, Eterm fun, Eterm args, Eterm* reg)
}
if (is_not_nil(tmp)) { /* Must be well-formed list */
- p->freason = EXC_UNDEF;
+ p->freason = EXC_BADARG;
return NULL;
}
reg[arity] = fun;