From: Evgeniy Khramtsov Date: Mon, 23 Jan 2017 18:52:25 +0000 (+0300) Subject: Make sure only {exit, normal} is not catched when executing a hook X-Git-Tag: 17.03-beta~76 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ce3a3665ade6c916e4548a764b15ef7f44a7427;p=ejabberd Make sure only {exit, normal} is not catched when executing a hook --- diff --git a/src/ejabberd_hooks.erl b/src/ejabberd_hooks.erl index 9f782b235..602ac577f 100644 --- a/src/ejabberd_hooks.erl +++ b/src/ejabberd_hooks.erl @@ -379,7 +379,7 @@ safe_apply(Hook, Module, Function, Args) -> true -> apply(Module, Function, Args) end - catch E:R when E /= exit, R /= normal -> + catch E:R when E /= exit; R /= normal -> ?ERROR_MSG("Hook ~p crashed when running ~p:~p/~p:~n" "** Reason = ~p~n" "** Arguments = ~p",