mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Fix error reporting in configuration related admin commands
This commit is contained in:
parent
a23b6fb7ec
commit
7a85e51237
@ -549,7 +549,7 @@ reload_config() ->
|
|||||||
ok -> {ok, ""};
|
ok -> {ok, ""};
|
||||||
Err ->
|
Err ->
|
||||||
Reason = ejabberd_config:format_error(Err),
|
Reason = ejabberd_config:format_error(Err),
|
||||||
{invalid_config, Reason}
|
{error, Reason}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
dump_config(Path) ->
|
dump_config(Path) ->
|
||||||
@ -557,7 +557,7 @@ dump_config(Path) ->
|
|||||||
ok -> {ok, ""};
|
ok -> {ok, ""};
|
||||||
Err ->
|
Err ->
|
||||||
Reason = ejabberd_config:format_error(Err),
|
Reason = ejabberd_config:format_error(Err),
|
||||||
{invalid_file, Reason}
|
{error, Reason}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
convert_to_yaml(In, Out) ->
|
convert_to_yaml(In, Out) ->
|
||||||
@ -565,7 +565,7 @@ convert_to_yaml(In, Out) ->
|
|||||||
ok -> {ok, ""};
|
ok -> {ok, ""};
|
||||||
Err ->
|
Err ->
|
||||||
Reason = ejabberd_config:format_error(Err),
|
Reason = ejabberd_config:format_error(Err),
|
||||||
{invalid_config, Reason}
|
{error, Reason}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%%
|
%%%
|
||||||
|
Loading…
Reference in New Issue
Block a user