aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ejabberd_commands.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl
index c279f2d0f..a4f38e836 100644
--- a/src/ejabberd_commands.erl
+++ b/src/ejabberd_commands.erl
@@ -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()]}].