Explorar o código

Remove the 'try' ... 'catch'

Feng Lee %!s(int64=6) %!d(string=hai) anos
pai
achega
cd94ba71b4
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  1. 1 6
      src/emqx_misc.erl

+ 1 - 6
src/emqx_misc.erl

@@ -72,7 +72,7 @@ pipeline([], Input, State) ->
     {ok, Input, State};
 
 pipeline([Fun|More], Input, State) ->
-    try apply_fun(Fun, Input, State) of
+    case apply_fun(Fun, Input, State) of
         ok -> pipeline(More, Input, State);
         {ok, NState} ->
             pipeline(More, Input, NState);
@@ -82,11 +82,6 @@ pipeline([Fun|More], Input, State) ->
             {error, Reason, State};
         {error, Reason, NState} ->
             {error, Reason, NState}
-    catch
-        Error:Reason:Stacktrace ->
-            ?LOG(error, "pipeline ~p failed: ~p,\nstacktrace: ~0p",
-                [{Fun, Input, State}, {Error, Reason}, Stacktrace]),
-            {error, Reason, State}
     end.
 
 -compile({inline, [apply_fun/3]}).