diff options
author | Daniel White <[email protected]> | 2015-03-25 14:23:15 +1100 |
---|---|---|
committer | Daniel White <[email protected]> | 2015-03-25 14:23:15 +1100 |
commit | 57671cbbb072041fa81fa850c3990961e4e120b8 (patch) | |
tree | ab4e61c0e7d15bb87be91705ddf1e21d898014eb /src | |
parent | 3d9078018d7f0a83a359b70c698d35e35fbb94f9 (diff) | |
download | cowboy-57671cbbb072041fa81fa850c3990961e4e120b8.tar.gz cowboy-57671cbbb072041fa81fa850c3990961e4e120b8.tar.bz2 cowboy-57671cbbb072041fa81fa850c3990961e4e120b8.zip |
Get stacktrace before executing rest_terminate
At present, the resulting stacktrace will be misleading about where the
underlying error occurred.
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_rest.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_rest.erl b/src/cowboy_rest.erl index f779612..63b5ce4 100644 --- a/src/cowboy_rest.erl +++ b/src/cowboy_rest.erl @@ -999,8 +999,8 @@ terminate(Req, State=#state{env=Env}) -> error_terminate(Req, State=#state{handler=Handler, handler_state=HandlerState}, Class, Reason, Callback) -> - rest_terminate(Req, State), Stacktrace = erlang:get_stacktrace(), + rest_terminate(Req, State), cowboy_req:maybe_reply(Stacktrace, Req), erlang:Class([ {reason, Reason}, |