Report meaningful error when luerl is not available
This commit is contained in:
parent
b1ecd8ac01
commit
8962397cf3
|
@ -38,6 +38,8 @@
|
||||||
%%% API
|
%%% API
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
from_dir(ProsodyDir) ->
|
from_dir(ProsodyDir) ->
|
||||||
|
case code:ensure_loaded(luerl) of
|
||||||
|
{module, _} ->
|
||||||
case file:list_dir(ProsodyDir) of
|
case file:list_dir(ProsodyDir) of
|
||||||
{ok, HostDirs} ->
|
{ok, HostDirs} ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
|
@ -56,6 +58,11 @@ from_dir(ProsodyDir) ->
|
||||||
?ERROR_MSG("failed to list ~s: ~s",
|
?ERROR_MSG("failed to list ~s: ~s",
|
||||||
[ProsodyDir, file:format_error(Why)]),
|
[ProsodyDir, file:format_error(Why)]),
|
||||||
Err
|
Err
|
||||||
|
end;
|
||||||
|
{error, _} = Err ->
|
||||||
|
?INFO_MSG("The file 'luerl.beam' is not found: maybe "
|
||||||
|
"ejabberd is not compiled with Lua support", []),
|
||||||
|
Err
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
|
|
Loading…
Reference in New Issue