Catch test errors with domains