diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index bb11e7a..4d7f055 100644 --- a/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -13,8 +13,8 @@ use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\migrate\Entity\MigrationInterface; +use Drupal\migrate\MigrateException; use Drupal\migrate\Plugin\MigrateIdMapInterface; -use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\Row; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -76,7 +76,7 @@ public function import(Row $row, array $old_destination_id_values = array()) { $this->rollbackAction = MigrateIdMapInterface::ROLLBACK_DELETE; $entity = $this->getEntity($row, $old_destination_id_values); if (!$entity) { - throw new MigrateSkipRowException('Unable to load entity.'); + throw new MigrateException('Unable to get entity'); } return $this->save($entity, $old_destination_id_values); } diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php index 7ab03b6..e5e57f2 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php @@ -80,8 +80,8 @@ public function testImport() { * Test row skipping when we can't get an entity to save. * * @covers ::import - * @expectedException \Drupal\migrate\MigrateSkipRowException - * @expectedExceptionMessage Unable to load entity. + * @expectedException \Drupal\migrate\MigrateException + * @expectedExceptionMessage Unable to get entity */ public function testImportEntityLoadFailure() { $bundles = [];