From cd94ba71b4efda2b2e94e25026f7a4a3bdea086d Mon Sep 17 00:00:00 2001 From: Feng Lee Date: Mon, 9 Dec 2019 11:36:31 +0800 Subject: [PATCH] Remove the 'try' ... 'catch' --- src/emqx_misc.erl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/emqx_misc.erl b/src/emqx_misc.erl index 4b084fd03..54cd41b17 100644 --- a/src/emqx_misc.erl +++ b/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]}).