25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-20 17:27:00 +01:00

Better formatting of unexpected return from Module:start/2

This commit is contained in:
Evgeniy Khramtsov 2018-08-28 10:41:57 +03:00
parent 0cbd41fbdc
commit b30a9f2f75

View File

@ -731,9 +731,10 @@ format_module_error(Module, Fun, Arity, Opts, Class, Reason, St) ->
"is it really an ejabberd module?",
[Fun, Module, Fun, Arity]);
{error, {bad_return, Module, Ret}} ->
io_lib:format("Module ~s returned unexpected value from "
"~s/~B: ~p; this is either not an ejabberd "
"module or it implements ejabbed API incorrectly",
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",
[Module, Fun, Arity, Ret]);
_ ->
io_lib:format("Internal error of module ~s has "