try to exit with a proper exit code if an error occurs in setUp method