aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_protocol.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-12-13 17:08:06 +0100
committerLoïc Hoguin <[email protected]>2012-12-13 17:08:06 +0100
commitd761a343807661fe7343f2f0977b4b1819cb8695 (patch)
treeac82c2cebe75958c106f043df60a759d5b89a180 /src/cowboy_protocol.erl
parent6074ce4a39fc4522e7a046bd1fd1921ed2ff34b4 (diff)
parentd916d739d4f844da69ec1c3472b74008dc828e58 (diff)
downloadcowboy-d761a343807661fe7343f2f0977b4b1819cb8695.tar.gz
cowboy-d761a343807661fe7343f2f0977b4b1819cb8695.tar.bz2
cowboy-d761a343807661fe7343f2f0977b4b1819cb8695.zip
Merge branch 'adt-consistent-errors' of git://github.com/Vagabond/cowboy
Diffstat (limited to 'src/cowboy_protocol.erl')
-rw-r--r--src/cowboy_protocol.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cowboy_protocol.erl b/src/cowboy_protocol.erl
index cbedbfa..0d15f32 100644
--- a/src/cowboy_protocol.erl
+++ b/src/cowboy_protocol.erl
@@ -497,12 +497,12 @@ handler_init(Req, State=#state{transport=Transport}, Handler, Opts) ->
catch Class:Reason ->
error_terminate(500, State),
error_logger:error_msg(
- "** Cowboy handler ~p terminating in init/3~n"
+ "** Cowboy handler ~p terminating in ~p/~p~n"
" for the reason ~p:~p~n"
"** Options were ~p~n"
"** Request was ~p~n"
"** Stacktrace: ~p~n~n",
- [Handler, Class, Reason, Opts,
+ [Handler, init, 3, Class, Reason, Opts,
cowboy_req:to_list(Req), erlang:get_stacktrace()])
end.
@@ -522,12 +522,12 @@ handler_handle(Req, State, Handler, HandlerState) ->
terminate_request(Req2, State, Handler, HandlerState2)
catch Class:Reason ->
error_logger:error_msg(
- "** Cowboy handler ~p terminating in handle/2~n"
+ "** Cowboy handler ~p terminating in ~p/~p~n"
" for the reason ~p:~p~n"
"** Handler state was ~p~n"
"** Request was ~p~n"
"** Stacktrace: ~p~n~n",
- [Handler, Class, Reason, HandlerState,
+ [Handler, handle, 2, Class, Reason, HandlerState,
cowboy_req:to_list(Req), erlang:get_stacktrace()]),
handler_terminate(Req, Handler, HandlerState),
error_terminate(500, State)
@@ -580,12 +580,12 @@ handler_call(Req, State, Handler, HandlerState, Message) ->
Handler, HandlerState2)
catch Class:Reason ->
error_logger:error_msg(
- "** Cowboy handler ~p terminating in info/3~n"
+ "** Cowboy handler ~p terminating in ~p/~p~n"
" for the reason ~p:~p~n"
"** Handler state was ~p~n"
"** Request was ~p~n"
"** Stacktrace: ~p~n~n",
- [Handler, Class, Reason, HandlerState,
+ [Handler, info, 3, Class, Reason, HandlerState,
cowboy_req:to_list(Req), erlang:get_stacktrace()]),
handler_terminate(Req, Handler, HandlerState),
error_terminate(500, State)
@@ -597,12 +597,12 @@ handler_terminate(Req, Handler, HandlerState) ->
Handler:terminate(cowboy_req:lock(Req), HandlerState)
catch Class:Reason ->
error_logger:error_msg(
- "** Cowboy handler ~p terminating in terminate/2~n"
+ "** Cowboy handler ~p terminating in ~p/~p~n"
" for the reason ~p:~p~n"
"** Handler state was ~p~n"
"** Request was ~p~n"
"** Stacktrace: ~p~n~n",
- [Handler, Class, Reason, HandlerState,
+ [Handler, terminate, 2, Class, Reason, HandlerState,
cowboy_req:to_list(Req), erlang:get_stacktrace()])
end.