From 2542cdb0c64eb661b4831673e1d24a8c29fb9748 Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Thu, 3 Nov 2016 11:38:22 +0000
Subject: [PATCH] Issue #2824444 by Adita, mikeryan: Remove obsolete try/catch
 from d6_cck_file

---
 .../file/src/Plugin/migrate/process/d6/CckFile.php | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php b/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php
index 0415c7ffb0dd..8cf2d19a4a40 100644
--- a/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php
+++ b/core/modules/file/src/Plugin/migrate/process/d6/CckFile.php
@@ -5,7 +5,6 @@
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\migrate\Plugin\MigrationInterface;
 use Drupal\migrate\MigrateExecutableInterface;
-use Drupal\migrate\MigrateSkipRowException;
 use Drupal\migrate\Plugin\MigrateProcessInterface;
 use Drupal\migrate\ProcessPluginBase;
 use Drupal\migrate\Row;
@@ -76,18 +75,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
     // some reason -- file migration is notoriously brittle -- and we do NOT
     // want to send invalid file references into the field system (it causes
     // fatals), so return an empty item instead.
-    try {
-      $fid = $this->migrationPlugin->transform($value['fid'], $migrate_executable, $row, $destination_property);
-    }
-    // If the migration plugin completely fails its lookup process, it will
-    // throw a MigrateSkipRowException. It shouldn't, but that is being dealt
-    // with at https://www.drupal.org/node/2487568. Until that lands, return
-    // an empty item.
-    catch (MigrateSkipRowException $e) {
-      return [];
-    }
-
-    if ($fid) {
+    if ($fid = $this->migrationPlugin->transform($value['fid'], $migrate_executable, $row, $destination_property)) {
       return [
         'target_id' => $fid,
         'display' => $value['list'],
-- 
GitLab