]> granicus.if.org Git - ejabberd/commitdiff
Better formatting of unexpected return from Module:start/2
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 28 Aug 2018 07:41:57 +0000 (10:41 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Tue, 28 Aug 2018 07:41:57 +0000 (10:41 +0300)
src/gen_mod.erl

index 040bcb7b8fd87e275806eee39afd641bfdf85dd9..8d225461c398be5df734778d1a06d2c91d772765 100644 (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 "