Provide a suggestion when unknown request handler is detected
This commit is contained in:
parent
11e963aa78
commit
268750e3b7
|
@ -971,10 +971,13 @@ prepare_request_module(Mod) when is_atom(Mod) ->
|
||||||
Mod;
|
Mod;
|
||||||
Err ->
|
Err ->
|
||||||
?ERROR_MSG(
|
?ERROR_MSG(
|
||||||
"Failed to load request handler ~s: "
|
"Failed to load request handler ~s, "
|
||||||
|
"did you mean ~s? Hint: "
|
||||||
"make sure there is no typo and file ~s.beam "
|
"make sure there is no typo and file ~s.beam "
|
||||||
"exists inside either ~s or ~s directory",
|
"exists inside either ~s or ~s directory",
|
||||||
[Mod, Mod,
|
[Mod,
|
||||||
|
misc:best_match(Mod, ejabberd_config:get_modules()),
|
||||||
|
Mod,
|
||||||
filename:dirname(code:which(?MODULE)),
|
filename:dirname(code:which(?MODULE)),
|
||||||
ext_mod:modules_dir()]),
|
ext_mod:modules_dir()]),
|
||||||
erlang:error(Err)
|
erlang:error(Err)
|
||||||
|
|
Loading…
Reference in New Issue