diff options
author | Peter Andersson <[email protected]> | 2014-02-06 19:05:32 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2014-02-07 16:03:18 +0100 |
commit | c31d60198b643c58498242f8c1de6641d7902b4a (patch) | |
tree | 7c7c07b01aa387ecf706e29ce5d91c386f04843d /lib/common_test/src/ct_util.erl | |
parent | 88a40030a9d7a81a51824cfa17427f4ed4ed2156 (diff) | |
download | otp-c31d60198b643c58498242f8c1de6641d7902b4a.tar.gz otp-c31d60198b643c58498242f8c1de6641d7902b4a.tar.bz2 otp-c31d60198b643c58498242f8c1de6641d7902b4a.zip |
Fix problem with logging exits that happen in init_per_testcase
Diffstat (limited to 'lib/common_test/src/ct_util.erl')
-rw-r--r-- | lib/common_test/src/ct_util.erl | 6 |
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 |