mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/translate.erl: When a translation file can't be loaded, show
detailed error message SVN Revision: 1669
This commit is contained in:
parent
9d521c9dd0
commit
ff6891cdd0
@ -1,5 +1,8 @@
|
|||||||
2008-10-25 Badlop <badlop@process-one.net>
|
2008-10-25 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/translate.erl: When a translation file can't be loaded, show
|
||||||
|
detailed error message
|
||||||
|
|
||||||
* src/ejabberd_ctl.erl: If ejabberd didn't start correctly:
|
* src/ejabberd_ctl.erl: If ejabberd didn't start correctly:
|
||||||
'ejabberdctl status' suggests to look in log files; any other
|
'ejabberdctl status' suggests to look in log files; any other
|
||||||
ejabberdctl command shows 'status'.
|
ejabberdctl command shows 'status'.
|
||||||
|
@ -89,8 +89,16 @@ load_file(Lang, File) ->
|
|||||||
ets:insert(translations,
|
ets:insert(translations,
|
||||||
{{Lang, Orig}, Trans1})
|
{{Lang, Orig}, Trans1})
|
||||||
end, Terms);
|
end, Terms);
|
||||||
|
%% Code copied from ejabberd_config.erl
|
||||||
|
{error, {_LineNumber, erl_parse, _ParseMessage} = Reason} ->
|
||||||
|
ExitText = lists:flatten(File ++ " approximately in the line "
|
||||||
|
++ file:format_error(Reason)),
|
||||||
|
?ERROR_MSG("Problem loading translation file ~n~s", [ExitText]),
|
||||||
|
exit(ExitText);
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
exit(file:format_error(Reason))
|
ExitText = lists:flatten(File ++ ": " ++ file:format_error(Reason)),
|
||||||
|
?ERROR_MSG("Problem loading translation file ~n~s", [ExitText]),
|
||||||
|
exit(ExitText)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
translate(Lang, Msg) ->
|
translate(Lang, Msg) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user