Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

MigrateDestinationInterface::import() should document that it can throw a MigrateException

$
0
0

Problem/Motivation

Looking at the code in MigrateExecutable, it looks like MigrateDestinationInterface::import() can throw a MigrateException.

Furthermore, while simply throwing a MigrateException causes the row to be considered to have failed, MigrateException's constructor allows a MigrateIdMapInterface status constant to be passed, so a destination plugin can do this to skip a row:

      throw new MigrateException("My message.", 0, NULL, MigrationInterface::MESSAGE_ERROR, MigrateIdMapInterface::STATUS_IGNORED);

This should be documented in MigrateDestinationInterface::import().

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 291721

Trending Articles