def METHOD_NAME(self):
    output, executions = self.setupLambdaEnv({
        'execution-options': {
            'output_dir': 's3://xyz?region=us-east-1', 'account_id': '004'},
        'policies': [{'resource': 'ec2', 'name': 'xyz'}]},
        err_execs=[PolicyExecutionError("foo")] * 2)
    self.assertRaises(
        PolicyExecutionError,
        handler.dispatch_event,
        {'detail': {'xyz': 'oui'}}, None)
    self.patch(handler, 'C7N_CATCH_ERR', True)
    handler.dispatch_event({'detail': {'xyz': 'oui'}}, None)
    self.assertEqual(output.getvalue().count('error during'), 2)