Skip to content

Commit

Permalink
Remove catch on decision flow crashes, let cowmachine handle it. (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell authored Feb 8, 2022
1 parent 816d130 commit 3cb0238
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/cowmachine_decision_core.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@
-include("cowmachine_log.hrl").

handle_request(#cmstate{ controller = Controller } = CmState, Context) ->
try
code:ensure_loaded(Controller),
d(v3b13, CmState, Context)
catch
error:Error:Stacktrace ->
throw({stop_request, 500, {Error, Stacktrace}})
end.
code:ensure_loaded(Controller),
d(v3b13, CmState, Context).

%% @doc Call the controller
-spec controller_call(atom(), #cmstate{}, term()) -> {term(), #cmstate{}, term()}.
Expand Down

0 comments on commit 3cb0238

Please sign in to comment.