aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-05-10 07:31:53 +0200
committerBjörn Gustavsson <[email protected]>2017-05-11 12:16:22 +0200
commitba5d07704cc4b54139c48c7d034f389a31c37a89 (patch)
tree3075122069bcfe11aec5050437b11f8a88ccf31a /lib/common_test
parent0e1e34a49cca0f077bc596954304a83fa9e403a8 (diff)
downloadotp-ba5d07704cc4b54139c48c7d034f389a31c37a89.tar.gz
otp-ba5d07704cc4b54139c48c7d034f389a31c37a89.tar.bz2
otp-ba5d07704cc4b54139c48c7d034f389a31c37a89.zip
ct_util: Stop using get_stacktrace/0 inappropriately
The return value of erlang:get_stacktrace/0 is not defined when called like this: try Expr of Pattern -> erlang:get_stacktrace() end Currently, the stacktrace will be from a random earlier error. In a future release, it may be []. Note: We can remove the entire 'case' statement because CTHReason can never be an atom.
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/src/ct_util.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index 4d3a2ae7e3..802e9be97c 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -201,14 +201,7 @@ do_start(Parent, Mode, LogDir, Verbosity) ->
ok ->
Parent ! {self(),started};
{fail,CTHReason} ->
- ErrorInfo = if is_atom(CTHReason) ->
- io_lib:format("{~p,~p}",
- [CTHReason,
- erlang:get_stacktrace()]);
- true ->
- CTHReason
- end,
- ct_logs:tc_print('Suite Callback',ErrorInfo,[]),
+ ct_logs:tc_print('Suite Callback',CTHReason,[]),
self() ! {{stop,{self(),{user_error,CTHReason}}},
{Parent,make_ref()}}
catch