Преглед изворни кода

fix(log): improve the error log message on hook failure (#3973)

Shawn пре 5 година
родитељ
комит
4f82c77e7a
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/emqx_hooks.erl

+ 2 - 2
src/emqx_hooks.erl

@@ -173,8 +173,8 @@ safe_execute(Fun, Args) ->
     try execute(Fun, Args) of
         Result -> Result
     catch
-        _:Reason:Stacktrace ->
-            ?LOG(error, "Failed to execute ~0p: ~0p", [Fun, {Reason, Stacktrace}]),
+        Error:Reason:Stacktrace ->
+            ?LOG(error, "Failed to execute ~0p: ~0p", [Fun, {Error, Reason, Stacktrace}]),
             ok
     end.