Remove the 'try' ... 'catch'
This commit is contained in:
parent
0c377c67cd
commit
cd94ba71b4
|
@ -72,7 +72,7 @@ pipeline([], Input, State) ->
|
||||||
{ok, Input, State};
|
{ok, Input, State};
|
||||||
|
|
||||||
pipeline([Fun|More], 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 -> pipeline(More, Input, State);
|
||||||
{ok, NState} ->
|
{ok, NState} ->
|
||||||
pipeline(More, Input, NState);
|
pipeline(More, Input, NState);
|
||||||
|
@ -82,11 +82,6 @@ pipeline([Fun|More], Input, State) ->
|
||||||
{error, Reason, State};
|
{error, Reason, State};
|
||||||
{error, Reason, NState} ->
|
{error, Reason, NState} ->
|
||||||
{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.
|
end.
|
||||||
|
|
||||||
-compile({inline, [apply_fun/3]}).
|
-compile({inline, [apply_fun/3]}).
|
||||||
|
|
Loading…
Reference in New Issue