aboutsummaryrefslogtreecommitdiff
path: root/src/gen_mod.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-07 22:12:14 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-07 22:12:14 +0300
commit80beb6d6f602d80c6a17cb8c660540d959fa9528 (patch)
tree7643cdebd6eec7dc3d9b6a6b3b57eaab1e3846ab /src/gen_mod.erl
parentFix return type in try_set_password() (diff)
Improve formatting of exceptions
Diffstat (limited to 'src/gen_mod.erl')
-rw-r--r--src/gen_mod.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gen_mod.erl b/src/gen_mod.erl
index 5e04c5dbb..f4d2323c4 100644
--- a/src/gen_mod.erl
+++ b/src/gen_mod.erl
@@ -451,16 +451,15 @@ format_module_error(Module, Fun, Arity, Opts, Class, Reason, St) ->
io_lib:format("Module ~s returned unexpected value from ~s/~B:~n"
"** Error: ~p~n"
"** Hint: this is either not an ejabberd module "
- "or it implements ejabbed API incorrectly",
+ "or it implements ejabberd API incorrectly",
[Module, Fun, Arity, Ret]);
_ ->
io_lib:format("Internal error of module ~s has "
"occured during ~s:~n"
"** Options: ~p~n"
- "** Class: ~p~n"
- "** Reason: ~p~n"
- "** Stacktrace: ~p",
- [Module, Fun, Opts, Class, Reason, St])
+ "** ~s",
+ [Module, Fun, Opts,
+ misc:format_exception(2, Class, Reason, St)])
end.
-spec format_hosts_list([binary()]) -> iolist().