25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-09 15:06:54 +02:00

* src/ejabberd_config.erl: If syntax mistake in config file, show

specific error message (EJAB-616)

SVN Revision: 1470
This commit is contained in:
Badlop 2008-07-22 16:08:57 +00:00
parent fb43bb0109
commit 543fb2d7e4
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-07-22 Badlop <badlop@process-one.net>
* src/ejabberd_config.erl: If syntax mistake in config file, show
specific error message (EJAB-616)
2008-07-22 Alexey Shchepin <alexey@process-one.net>
* src/odbc/odbc_queries.erl: Fixed a typo

View File

@ -95,10 +95,14 @@ get_plain_terms_file(File1) ->
case file:consult(File) of
{ok, Terms} ->
include_config_files(Terms);
{error, Reason} ->
ExitText = lists:flatten(File ++ ": around line "
{error, {_LineNumber, erl_parse, _ParseMessage} = Reason} ->
ExitText = lists:flatten(File ++ " approximately in the line "
++ file:format_error(Reason)),
?ERROR_MSG("Problem loading ejabberd config file:~n~s", [ExitText]),
?ERROR_MSG("Problem loading ejabberd config file ~n~s", [ExitText]),
exit(ExitText);
{error, Reason} ->
ExitText = lists:flatten(File ++ ": " ++ file:format_error(Reason)),
?ERROR_MSG("Problem loading ejabberd config file ~n~s", [ExitText]),
exit(ExitText)
end.