@@ -391,17 +391,17 @@ test_fun(ConfirmFun, NotifyPid) ->
391391 % % Store the FSM Pid for use in unported tests
392392 put (test_runner_fsm , NotifyPid ),
393393 % % Exceptions and their handling sucks, but eunit throws
394- % % errors `erlang:error' so here we are
395- try ConfirmFun () of
396- TestResult ->
397- ? MODULE :send_event (NotifyPid , test_result (TestResult ))
398- catch
399- Error :Reason ->
400- lager :error (" Failed to execute confirm function ~p due to ~p with reason ~p (trace: ~p )" ,
401- [ConfirmFun , Error , Reason , erlang :get_stacktrace ()]),
402- TestResult = format_eunit_error (Reason ),
403- ? MODULE :send_event (NotifyPid , test_result (TestResult ))
404- end
394+ % % errors `erlang:error' so here we are
395+ try ConfirmFun () of
396+ TestResult ->
397+ ? MODULE :send_event (NotifyPid , test_result (TestResult ))
398+ catch
399+ Error :Reason ->
400+ lager :error (" Failed to execute confirm function ~p due to ~p with reason ~p (trace: ~p )" ,
401+ [ConfirmFun , Error , Reason , erlang :get_stacktrace ()]),
402+ TestResult = format_eunit_error (Reason ),
403+ ? MODULE :send_event (NotifyPid , test_result (TestResult ))
404+ end
405405 end .
406406
407407format_eunit_error ({assertion_failed , InfoList }) ->
0 commit comments