aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_util.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-02-10 16:17:47 +0100
committerPeter Andersson <[email protected]>2014-02-10 16:24:46 +0100
commitc7174e89688d449a79b2180e61f8003ba0e731fd (patch)
tree7bf60335c6800c49b38c3b122df2c28676eeb4a0 /lib/common_test/src/ct_util.erl
parente2cd468965a3c699d63867b1c99319fdbd06c08e (diff)
parentc31d60198b643c58498242f8c1de6641d7902b4a (diff)
downloadotp-c7174e89688d449a79b2180e61f8003ba0e731fd.tar.gz
otp-c7174e89688d449a79b2180e61f8003ba0e731fd.tar.bz2
otp-c7174e89688d449a79b2180e61f8003ba0e731fd.zip
Merge branch 'peppe/common_test/init_per_testcase_problem'
* peppe/common_test/init_per_testcase_problem: Fix problem with logging exits that happen in init_per_testcase OTP-11643
Diffstat (limited to 'lib/common_test/src/ct_util.erl')
-rw-r--r--lib/common_test/src/ct_util.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index 1d851f8d2f..ac9857487d 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -382,13 +382,17 @@ loop(Mode,TestData,StartDir) ->
TestData1 =
case lists:keysearch(Key,1,TestData) of
{value,{Key,Val}} ->
- case Fun(Val) of
+ try Fun(Val) of
'$delete' ->
return(From,deleted),
lists:keydelete(Key,1,TestData);
NewVal ->
return(From,NewVal),
[{Key,NewVal}|lists:keydelete(Key,1,TestData)]
+ catch
+ _:Error ->
+ return(From,{error,Error}),
+ TestData
end;
_ ->
case lists:member(create,Opts) of