aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_loop.erl
diff options
context:
space:
mode:
authorJames Fish <[email protected]>2015-05-06 16:21:14 +0100
committerJames Fish <[email protected]>2015-05-07 18:43:09 +0100
commit271869889587085494baaedc6b44e939252637f0 (patch)
tree3928c75e4d0ee108a1149290c552ca13217fe50b /src/cowboy_loop.erl
parent1f5b19a0b791e5eedeb4bd0f8fcaac29e61fb03a (diff)
downloadcowboy-271869889587085494baaedc6b44e939252637f0.tar.gz
cowboy-271869889587085494baaedc6b44e939252637f0.tar.bz2
cowboy-271869889587085494baaedc6b44e939252637f0.zip
Exit with exit/1 on handler exception and include class in reason
Diffstat (limited to 'src/cowboy_loop.erl')
-rw-r--r--src/cowboy_loop.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cowboy_loop.erl b/src/cowboy_loop.erl
index 8920299..f0b2886 100644
--- a/src/cowboy_loop.erl
+++ b/src/cowboy_loop.erl
@@ -161,13 +161,14 @@ call(Req, State=#state{resp_sent=RespSent},
cowboy_req:maybe_reply(Stacktrace, Req)
end,
cowboy_handler:terminate({crash, Class, Reason}, Req, HandlerState, Handler),
- erlang:Class([
+ exit({cowboy_handler, [
+ {class, Class},
{reason, Reason},
{mfa, {Handler, info, 3}},
{stacktrace, Stacktrace},
{req, cowboy_req:to_list(Req)},
{state, HandlerState}
- ])
+ ]})
end.
%% It is sometimes important to make a socket passive as it was initially