/**
  * @param ExceptionEvent $event
  */
 public function onException(ExceptionEvent $event)
 {
     $this->output->writeln(sprintf('<error>%s</error>', $event->getException()->getMessage()));
 }
 /**
  * Handler for an exception event. Importer types can listen to the same
  * event and stop propagation if they want to change this behaviour.
  *
  * @param ExceptionEvent $event
  *
  * @throws \RuntimeException
  */
 public function onException(ExceptionEvent $event)
 {
     $exception = $event->getException();
     if ($exception instanceof ReadException) {
         $msg = sprintf('Error reading feed: %s', $exception->getMessage());
     } else {
         $msg = sprintf('Import aborted with %s: "%s" Stack trace: %s', get_class($exception), $exception->getMessage(), $exception->getTraceAsString());
     }
     throw new \RuntimeException($msg, 0, $exception);
 }
 /**
  * @param ExceptionEvent $event
  */
 public function onException(ExceptionEvent $event)
 {
     $this->logger->error($event->getException()->getMessage());
 }