Removed fun_stacktrace

* introduced in ad2d57d8b6
* CI/CD uses R23 and onwards
* erlang:get_stacktrace/0 removed in R23.

[1] https://www.erlang.org/doc/general_info/removed#functions-removed-in-otp-23
This commit is contained in:
Ariel Otilibili 2024-02-25 13:22:43 +01:00
parent 5de3c80cc2
commit c0a02892cd
2 changed files with 1 additions and 21 deletions

View file

@ -8,11 +8,7 @@
{erl_first_files, ["ec_dictionary", "ec_vsn"]}.
%% Compiler Options ============================================================
{erl_opts,
[{platform_define, "^2", unicode_str},
{platform_define, "^(R|1|20)", fun_stacktrace},
debug_info,
warnings_as_errors]}.
{erl_opts, [debug_info, warnings_as_errors]}.
%% EUnit =======================================================================
{eunit_opts, [verbose,

View file

@ -858,21 +858,6 @@ cluster_runmany(_, _, [_Non|_Empty], []=_Nodes, []=_Running, _) ->
%% We have data, but no nodes either available or occupied
erlang:exit(allnodescrashed).
-ifdef(fun_stacktrace).
runmany_wrap(Fun, Parent) ->
try
Fun()
catch
exit:siblingdied ->
ok;
exit:Reason ->
Parent ! {erlang:self(), error, Reason};
error:R ->
Parent ! {erlang:self(), error, {R, erlang:get_stacktrace()}};
throw:R ->
Parent ! {erlang:self(), error, {{nocatch, R}, erlang:get_stacktrace()}}
end.
-else.
runmany_wrap(Fun, Parent) ->
try
Fun()
@ -886,7 +871,6 @@ runmany_wrap(Fun, Parent) ->
throw:R:Stacktrace ->
Parent ! {erlang:self(), error, {{nocatch, R}, Stacktrace}}
end.
-endif.
delete_running(Pid, [{Pid, Node, List}|Running], Acc) ->
{Running ++ Acc, Node, List};