diff options
Diffstat (limited to 'src/mango/src/mango_httpd.erl')
-rw-r--r-- | src/mango/src/mango_httpd.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mango/src/mango_httpd.erl b/src/mango/src/mango_httpd.erl index 8d5a2123d..0d035dd99 100644 --- a/src/mango/src/mango_httpd.erl +++ b/src/mango/src/mango_httpd.erl @@ -36,10 +36,9 @@ handle_req(#httpd{} = Req, Db) -> try handle_req_int(Req, Db) catch - throw:{mango_error, Module, Reason} -> + throw:{mango_error, Module, Reason}:Stack -> case mango_error:info(Module, Reason) of {500, ErrorStr, ReasonStr} -> - Stack = erlang:get_stacktrace(), chttpd:send_error(Req, {ErrorStr, ReasonStr, Stack}); {Code, ErrorStr, ReasonStr} -> chttpd:send_error(Req, Code, ErrorStr, ReasonStr) |