From af287d7b242b27a05084580f110db2f4a6667e54 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Fri, 4 May 2012 19:08:03 +0200 Subject: Fix timetrap error in pre-hooks --- lib/common_test/src/ct_hooks.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/common_test/src/ct_hooks.erl') diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl index 0fe6e03079..e53ef9f202 100644 --- a/lib/common_test/src/ct_hooks.erl +++ b/lib/common_test/src/ct_hooks.erl @@ -125,7 +125,7 @@ end_tc(_Mod, TC, Config, Result, _Return) -> on_tc_skip(How, {Suite, Case, Reason}) -> call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]). -on_tc_fail(_How, {Suite, Case, Reason}) -> +on_tc_fail(How, {Suite, Case, Reason}) -> call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, Case]). %% ------------------------------------------------------------------------- @@ -353,7 +353,6 @@ pos(Id,[_|Rest],Num) -> pos(Id,Rest,Num+1). - catch_apply(M,F,A, Default) -> try apply(M,F,A) -- cgit v1.2.3 From e711632042d1538fce80d565a2add309a88efa1b Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Tue, 8 May 2012 17:47:21 +0200 Subject: Fix IO printout crash caused by hook function --- lib/common_test/src/ct_hooks.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common_test/src/ct_hooks.erl') diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl index e53ef9f202..98b74665de 100644 --- a/lib/common_test/src/ct_hooks.erl +++ b/lib/common_test/src/ct_hooks.erl @@ -125,7 +125,7 @@ end_tc(_Mod, TC, Config, Result, _Return) -> on_tc_skip(How, {Suite, Case, Reason}) -> call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]). -on_tc_fail(How, {Suite, Case, Reason}) -> +on_tc_fail(_How, {Suite, Case, Reason}) -> call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, Case]). %% ------------------------------------------------------------------------- @@ -356,7 +356,7 @@ pos(Id,[_|Rest],Num) -> catch_apply(M,F,A, Default) -> try apply(M,F,A) - catch error:Reason -> + catch _:Reason -> case erlang:get_stacktrace() of %% Return the default if it was the CTH module which did not have the function. [{M,F,A,_}|_] when Reason == undef -> -- cgit v1.2.3