本文整理汇总了PHP中Akeneo\Bundle\BatchBundle\Entity\StepExecution::addFailureException方法的典型用法代码示例。如果您正苦于以下问题:PHP StepExecution::addFailureException方法的具体用法?PHP StepExecution::addFailureException怎么用?PHP StepExecution::addFailureException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Akeneo\Bundle\BatchBundle\Entity\StepExecution
的用法示例。
在下文中一共展示了StepExecution::addFailureException方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetAddFailureExceptions
public function testGetAddFailureExceptions()
{
$this->assertEmpty($this->stepExecution->getFailureExceptions());
$exception1 = new \Exception('My exception 1', 1);
$exception2 = new \Exception('My exception 2', 2);
$this->assertEntity($this->stepExecution->addFailureException($exception1));
$this->assertEntity($this->stepExecution->addFailureException($exception2));
$failureExceptions = $this->stepExecution->getFailureExceptions();
$this->assertEquals('Exception', $failureExceptions[0]['class']);
$this->assertEquals('My exception 1', $failureExceptions[0]['message']);
$this->assertEquals('1', $failureExceptions[0]['code']);
$this->assertContains(__FUNCTION__, $failureExceptions[0]['trace']);
$this->assertEquals('Exception', $failureExceptions[1]['class']);
$this->assertEquals('My exception 2', $failureExceptions[1]['message']);
$this->assertEquals('2', $failureExceptions[1]['code']);
$this->assertContains(__FUNCTION__, $failureExceptions[1]['trace']);
}
示例2: addFailureException
/**
* {@inheritDoc}
*/
public function addFailureException(\Exception $e)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'addFailureException', array($e));
return parent::addFailureException($e);
}
开发者ID:aml-bendall,项目名称:ExpandAkeneoApi,代码行数:8,代码来源:__CG__AkeneoBundleBatchBundleEntityStepExecution.php