aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/common_test/src/ct_framework.erl18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index c8450280ef..9e7886c1ad 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -1063,8 +1063,7 @@ get_suite(Mod, all) ->
catch
throw:{error,Error} ->
[{?MODULE,error_in_suite,[[{error,Error}]]}];
- _:Error ->
- S = erlang:get_stacktrace(),
+ _:Error:S ->
[{?MODULE,error_in_suite,[[{error,{Error,S}}]]}]
end;
{error,{bad_return,_Bad}} ->
@@ -1136,8 +1135,7 @@ get_suite(Mod, Group={conf,Props,_Init,TCs,_End}) ->
catch
throw:{error,Error} ->
[{?MODULE,error_in_suite,[[{error,Error}]]}];
- _:Error ->
- S = erlang:get_stacktrace(),
+ _:Error:S ->
[{?MODULE,error_in_suite,[[{error,{Error,S}}]]}]
end;
{error,{bad_return,_Bad}} ->
@@ -1214,8 +1212,7 @@ get_all(Mod, ConfTests) ->
catch
throw:{error,Error} ->
[{?MODULE,error_in_suite,[[{error,Error}]]}];
- _:Error ->
- S = erlang:get_stacktrace(),
+ _:Error:S ->
[{?MODULE,error_in_suite,[[{error,{Error,S}}]]}]
end;
Skip = {skip,_Reason} ->
@@ -1636,8 +1633,8 @@ safe_apply_all_0(Mod) ->
Bad ->
{error,{bad_return,Bad}}
catch
- _:Reason ->
- handle_callback_crash(Reason,erlang:get_stacktrace(),Mod,all,{error,undef})
+ _:Reason:Stacktrace ->
+ handle_callback_crash(Reason,Stacktrace,Mod,all,{error,undef})
end.
all_hook(Mod, All) ->
@@ -1666,9 +1663,8 @@ safe_apply_groups_0(Mod,Default) ->
Bad ->
{error,{bad_return,Bad}}
catch
- _:Reason ->
- handle_callback_crash(Reason,erlang:get_stacktrace(),
- Mod,groups,Default)
+ _:Reason:Stacktrace ->
+ handle_callback_crash(Reason,Stacktrace,Mod,groups,Default)
end.
handle_callback_crash(undef,[{Mod,Func,[],_}|_],Mod,Func,Default) ->