diff options
Diffstat (limited to 'src/cowboy_rest.erl')
-rw-r--r-- | src/cowboy_rest.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index 1a478a1..cf24050 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -977,13 +977,14 @@ error_terminate(Req, #state{handler=Handler, handler_state=HandlerState}, Stacktrace = erlang:get_stacktrace(), cowboy_req:maybe_reply(Stacktrace, Req), cowboy_handler:terminate({crash, Class, Reason}, Req, HandlerState, Handler), - erlang:Class([ + exit({cowboy_handler, [ + {class, Class}, {reason, Reason}, {mfa, {Handler, Callback, 2}}, {stacktrace, Stacktrace}, {req, cowboy_req:to_list(Req)}, {state, HandlerState} - ]). + ]}). terminate(Req, #state{env=Env, handler=Handler, handler_state=HandlerState}) -> Result = cowboy_handler:terminate(normal, Req, HandlerState, Handler), |