fix(exhook): fix the error message of unknown hookpoint

Now if there is an unknown hookpoint, the error message is actually `{unknown_hookpoint,{error,badarg}}`,
the hookpoint name information is lost
This commit is contained in:
firest 2022-08-24 17:08:55 +08:00
parent 7fca34c11a
commit 9555401ce1
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ resolve_hookspec(HookSpecs) when is_list(HookSpecs) ->
end, end,
case {lists:member(Name, AvailableHooks), lists:member(Name, MessageHooks)} of case {lists:member(Name, AvailableHooks), lists:member(Name, MessageHooks)} of
{false, _} -> {false, _} ->
error({unknown_hookpoint, Name}); error({unknown_hookpoint, Name0});
{true, false} -> {true, false} ->
Acc#{Name => #{}}; Acc#{Name => #{}};
{true, true} -> {true, true} ->