Added OnError target to functional tests.