Debug hooks

This commit is contained in:
Evgeny Khramtsov 2019-07-08 09:57:33 +03:00
parent 83e6741117
commit d4d352492c
1 changed files with 2 additions and 0 deletions

View File

@ -379,6 +379,8 @@ run_fold1([{_Seq, Module, Function} | Ls], Hook, Val, Args) ->
end.
safe_apply(Hook, Module, Function, Args) ->
?DEBUG("Running hook ~p: ~p:~p/~B",
[Hook, Module, Function, length(Args)]),
try if is_function(Function) ->
apply(Function, Args);
true ->