You are here

protected function FeedsQueueExecutable::handleException in Feeds 8.3

Handles an exception during importing.

Parameters

\Drupal\feeds\FeedInterface $feed: The feed.

string $stage: The stage which the import is at.

array $params: Parameters relevant to current stage.

\Exception $exception: The exception that was thrown.

Throws

\Exception Thrown if the exception should not be ignored.

Overrides FeedsExecutable::handleException

File

src/FeedsQueueExecutable.php, line 67

Class

FeedsQueueExecutable
Import feeds using the queue API.

Namespace

Drupal\feeds

Code

protected function handleException(FeedInterface $feed, $stage, array $params, Exception $exception) {
  $feed
    ->finishImport();
  if ($exception instanceof EmptyFeedException) {
    return;
  }
  throw $exception;
}