Example #1
0
 /**
  * Handle step execution warning
  *
  * @param object                                    $element
  * @param \Exception                                $e
  * @param StepExecutionWarningHandlerInterface|null $warningHandler
  */
 protected function handleStepExecutionWarning($element, \Exception $e, StepExecutionWarningHandlerInterface $warningHandler = null)
 {
     if (null !== $warningHandler) {
         $warningName = $element instanceof AbstractConfigurableStepElement ? $element->getName() : get_class($element);
         $item = $e instanceof InvalidItemException ? $e->getItem() : null;
         $warningHandler->handleWarning($element, $warningName, $e->getMessage(), $e->getMessageParameters(), $item);
     }
 }