From b30a9f2f75471e2d376da43dab3509fbc75d9ceb Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Tue, 28 Aug 2018 10:41:57 +0300 Subject: [PATCH] Better formatting of unexpected return from Module:start/2 --- src/gen_mod.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gen_mod.erl b/src/gen_mod.erl index 040bcb7b8..8d225461c 100644 --- a/src/gen_mod.erl +++ b/src/gen_mod.erl @@ -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 " -- 2.40.0