catch exceptions in autmated tests