diff options
author | Sergey Urbanovich <[email protected]> | 2013-06-07 21:06:27 +0400 |
---|---|---|
committer | Sergey Urbanovich <[email protected]> | 2013-06-07 21:06:27 +0400 |
commit | 1577ec83645f4b4a76e8ac6b4d9cc59376ce38d4 (patch) | |
tree | 2179cc570f001042c10141cf55e6106e06d638bd /.gitignore | |
parent | bfbe1cc5c60471efe3e840f5658957ace0269dbd (diff) | |
download | cowboy-1577ec83645f4b4a76e8ac6b4d9cc59376ce38d4.tar.gz cowboy-1577ec83645f4b4a76e8ac6b4d9cc59376ce38d4.tar.bz2 cowboy-1577ec83645f4b4a76e8ac6b4d9cc59376ce38d4.zip |
Don't overwrite stacktrace in `cowboy_rest:error_terminate/2`
This stacktrace is very useful in the `onresponse` hook. For example:
```erlang
internal_error_hook(500, Headers, <<>>, Req) ->
StackTrace = erlang:get_stacktrace(),
Headers0 = [{N, V} || {N, V} <- Headers, N =/= <<"content-length">>],
Body = io_lib:format("~p", [StackTrace]),
{ok, Req0} = cowboy_req:reply(500, Headers0, Body, Req),
Req0;
internal_error_hook(Status, Headers, Body, Req) ->
{ok, Req0} = cowboy_req:reply(Status, Headers, Body, Req),
Req0.
```
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions