aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-10-04 16:30:17 +0200
committerSverker Eriksson <[email protected]>2016-10-04 16:30:17 +0200
commitee6e1bbfab12d5b1106fab2745fc73f7ad7b473e (patch)
tree604e89c7f8ea25dd3e5d4130ea849f3ecbda0f45
parent634d26929bb5852958870a7b18f67b4b8702bfa2 (diff)
downloadotp-ee6e1bbfab12d5b1106fab2745fc73f7ad7b473e.tar.gz
otp-ee6e1bbfab12d5b1106fab2745fc73f7ad7b473e.tar.bz2
otp-ee6e1bbfab12d5b1106fab2745fc73f7ad7b473e.zip
erts: Print error code from failed NIF load/upgrade/reload
in Text part of error tuple, like {error, {load, "Library load-call unsuccessful (606)}}
-rw-r--r--erts/emulator/beam/erl_nif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 3a547982da..9a873857b9 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -3360,7 +3360,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
veto = entry->reload(&env, &lib->priv_data, BIF_ARG_2);
erts_post_nif(&env);
if (veto) {
- ret = load_nif_error(BIF_P, reload, "Library reload-call unsuccessful.");
+ ret = load_nif_error(BIF_P, reload, "Library reload-call unsuccessful (%d).", veto);
}
else {
commit_opened_resource_types(lib);
@@ -3382,7 +3382,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
erts_post_nif(&env);
if (veto) {
prev_mi->nif->priv_data = prev_old_data;
- ret = load_nif_error(BIF_P, upgrade, "Library upgrade-call unsuccessful.");
+ ret = load_nif_error(BIF_P, upgrade, "Library upgrade-call unsuccessful (%d).", veto);
}
else
commit_opened_resource_types(lib);
@@ -3392,7 +3392,7 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
veto = entry->load(&env, &lib->priv_data, BIF_ARG_2);
erts_post_nif(&env);
if (veto) {
- ret = load_nif_error(BIF_P, "load", "Library load-call unsuccessful.");
+ ret = load_nif_error(BIF_P, "load", "Library load-call unsuccessful (%d).", veto);
}
else
commit_opened_resource_types(lib);