aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_rest.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_rest.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_rest.erl')
-rw-r--r--src/cowboy_rest.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl
index 35ca34d..c6b53bd 100644
--- a/src/cowboy_rest.erl
+++ b/src/cowboy_rest.erl
@@ -73,10 +73,10 @@ upgrade(_ListenerPid, Handler, Opts, Req) ->
catch Class:Reason ->
PLReq = cowboy_req:to_list(Req),
error_logger:error_msg(
- "** Cowboy handler ~p terminating in rest_init/2~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, PLReq, erlang:get_stacktrace()]),
+ [Handler, rest_init, 2, Class, Reason, Opts, PLReq, erlang:get_stacktrace()]),
{ok, _Req2} = cowboy_req:reply(500, Req),
close
end.
@@ -735,9 +735,9 @@ choose_content_type(Req,
no_call ->
error_logger:error_msg(
"** Cowboy handler ~p terminating; "
- "function ~p was not exported~n"
+ "function ~p/~p was not exported~n"
"** Request was ~p~n** State was ~p~n~n",
- [Handler, Fun, cowboy_req:to_list(Req), HandlerState]),
+ [Handler, Fun, 2, cowboy_req:to_list(Req), HandlerState]),
{ok, _} = cowboy_req:reply(500, Req),
close;
{halt, Req2, HandlerState} ->
@@ -787,9 +787,9 @@ set_resp_body(Req, State=#state{handler=Handler, handler_state=HandlerState,
no_call ->
error_logger:error_msg(
"** Cowboy handler ~p terminating; "
- "function ~p was not exported~n"
+ "function ~p/~p was not exported~n"
"** Request was ~p~n** State was ~p~n~n",
- [Handler, Fun, cowboy_req:to_list(Req5), HandlerState]),
+ [Handler, Fun, 2, cowboy_req:to_list(Req5), HandlerState]),
{ok, _} = cowboy_req:reply(500, Req5),
close;
{halt, Req6, HandlerState} ->