Skip to content

Commit

Permalink
Fix crash of logger if called from a 500 catch
Browse files Browse the repository at this point in the history
  • Loading branch information
mworrell committed May 26, 2014
1 parent 7a47257 commit 205edc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webmachine_mochiweb.erl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ loop(MochiReq, LoopOpts) ->
error_logger:warning_msg("~p:~p caught error ~p (stacktrace ~p)", [?MODULE, ?LINE, Error, erlang:get_stacktrace()]),
{ok,RD3} = webmachine_request:send_response(RD2#wm_reqdata{response_code=500}),
webmachine_controller:stop(Resource, RD3),
webmachine_decision_core:do_log(RD3)
webmachine_decision_core:do_log(webmachine_request:log_data(RD3))
end;
handled ->
nop
Expand Down

0 comments on commit 205edc4

Please sign in to comment.