summaryrefslogtreecommitdiff
path: root/src/mango
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@gmail.com>2022-06-17 17:42:27 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2022-06-17 18:59:17 -0400
commit0a229d8fbbecc378cc6b91c2d6704a2a33d95f0d (patch)
treeecda89863c97f6cd4b9434a23f4809a10f4dcda4 /src/mango
parent11eea624b18455b8b4a396912a0acccd65fa2af3 (diff)
downloadcouchdb-0a229d8fbbecc378cc6b91c2d6704a2a33d95f0d.tar.gz
Remove Erlang < 23 ifdefs and other macros
Diffstat (limited to 'src/mango')
-rw-r--r--src/mango/src/mango_httpd.erl10
-rw-r--r--src/mango/src/mango_util.erl6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mango/src/mango_httpd.erl b/src/mango/src/mango_httpd.erl
index 002c45b2f..3e58288da 100644
--- a/src/mango/src/mango_httpd.erl
+++ b/src/mango/src/mango_httpd.erl
@@ -35,12 +35,12 @@ handle_req(#httpd{} = Req, Db0) ->
Db = set_user_ctx(Req, Db0),
handle_req_int(Req, Db)
catch
- ?STACKTRACE(throw, {mango_error, Module, Reason}, Stack)
+ throw:{mango_error, Module, Reason}:Stack ->
case mango_error:info(Module, Reason) of
- {500, ErrorStr, ReasonStr} ->
- chttpd:send_error(Req, {ErrorStr, ReasonStr, Stack});
- {Code, ErrorStr, ReasonStr} ->
- chttpd:send_error(Req, Code, ErrorStr, ReasonStr)
+ {500, ErrorStr, ReasonStr} ->
+ chttpd:send_error(Req, {ErrorStr, ReasonStr, Stack});
+ {Code, ErrorStr, ReasonStr} ->
+ chttpd:send_error(Req, Code, ErrorStr, ReasonStr)
end
end.
diff --git a/src/mango/src/mango_util.erl b/src/mango/src/mango_util.erl
index 609a9dbc0..c7ab1c8a6 100644
--- a/src/mango/src/mango_util.erl
+++ b/src/mango/src/mango_util.erl
@@ -131,13 +131,13 @@ do_defer(Mod, Fun, Args) ->
Resp ->
erlang:exit({mango_defer_ok, Resp})
catch
- ?STACKTRACE(throw, Error, Stack)
+ throw:Error:Stack ->
couch_log:error("Defered error: ~w~n ~p", [{throw, Error}, Stack]),
erlang:exit({mango_defer_throw, Error});
- ?STACKTRACE(error, Error, Stack)
+ error:Error:Stack ->
couch_log:error("Defered error: ~w~n ~p", [{error, Error}, Stack]),
erlang:exit({mango_defer_error, Error});
- ?STACKTRACE(exit, Error, Stack)
+ exit:Error:Stack ->
couch_log:error("Defered error: ~w~n ~p", [{exit, Error}, Stack]),
erlang:exit({mango_defer_exit, Error})
end.