25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Cut the string when calling halt/1

This commit is contained in:
Badlop 2011-05-30 17:11:32 +02:00
parent dfd7936ea6
commit 09b4e36457
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ exit_or_halt(ExitText) ->
case [Vsn || {ejabberd, _Desc, Vsn} <- application:which_applications()] of
[] ->
timer:sleep(1000),
halt(ExitText);
halt(string:substr(ExitText, 1, 199));
[_] ->
exit(ExitText)
end.

View File

@ -94,7 +94,7 @@ start_module2(Host, Module, Opts) ->
false ->
?CRITICAL_MSG("ejabberd initialization was aborted because a module start failed.", []),
timer:sleep(3000),
erlang:halt(lists:flatten(ErrorText))
erlang:halt(string:substr(lists:flatten(ErrorText), 1, 199))
end
end.