Skip to content

Commit

Permalink
Merge branch 'master' into fix_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mmzeeman authored May 6, 2022
2 parents cae2c54 + 072e1c5 commit f221a45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cowmachine.erl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
%% @author Marc Worrell <[email protected]>
%% @copyright 2016-2019 Marc Worrell
%% @copyright 2016-2022 Marc Worrell
%%
%% @doc Cowmachine: webmachine middleware for Cowboy/Zotonic
%% @end

%% Copyright 2016-2019 Marc Worrell
%% Copyright 2016-2022 Marc Worrell
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -132,10 +132,11 @@ request_1(Controller, Req, Env, Options, Context) ->
log(#{ at => ?AT, level => error, code => 500, text => "Unexpected exception",
class => Class, reason => Reason,
stack => Stacktrace}, Req),
{stop, cowboy_req:reply(500, Req)}
handle_stop_request(500, Site, {throw, {Reason, Stacktrace}}, Req, Env, State, Context)
end,
ReqResult.


% @todo add the error controller as an application env, if not defined then just terminate with the corresponding error code.

-spec handle_stop_request(ResponseCode, Site, Reason, Req, Env, State, Context) -> Result when
Expand Down

0 comments on commit f221a45

Please sign in to comment.