mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
If command crashes, return restuple with error and explanation (ejabberd-contrib #21)
This commit is contained in:
parent
33c9f21171
commit
d9ad26b4ec
@ -317,7 +317,13 @@ execute_command2(Command, Arguments) ->
|
||||
Module = Command#ejabberd_commands.module,
|
||||
Function = Command#ejabberd_commands.function,
|
||||
?DEBUG("Executing command ~p:~p with Args=~p", [Module, Function, Arguments]),
|
||||
apply(Module, Function, Arguments).
|
||||
try apply(Module, Function, Arguments) of
|
||||
Response ->
|
||||
Response
|
||||
catch
|
||||
Problem ->
|
||||
{error, Problem}
|
||||
end.
|
||||
|
||||
-spec get_tags_commands() -> [{string(), [string()]}].
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user