3 namespace Drupal\migrate;
5 use Drupal\migrate\Plugin\MigrateIdMapInterface;
6 use Drupal\migrate\Plugin\MigrationInterface;
9 * Defines the migrate exception class.
11 class MigrateException extends \Exception {
14 * The level of the error being reported.
16 * The value is a Migration::MESSAGE_* constant.
23 * The status to record in the map table for the current item.
25 * The value is a MigrateMap::STATUS_* constant.
32 * Constructs a MigrateException object.
34 * @param string $message
35 * The message for the exception.
38 * @param \Exception $previous
39 * The previous exception used for the exception chaining.
41 * The level of the error, a Migration::MESSAGE_* constant.
43 * The status of the item for the map table, a MigrateMap::STATUS_*
46 public function __construct($message = NULL, $code = 0, \Exception $previous = NULL, $level = MigrationInterface::MESSAGE_ERROR, $status = MigrateIdMapInterface::STATUS_FAILED) {
47 $this->level = $level;
48 $this->status = $status;
49 parent::__construct($message);
56 * An integer status code. @see Migration::MESSAGE_*
58 public function getLevel() {
63 * Gets the status of the current item.
66 * An integer status code. @see MigrateMap::STATUS_*
68 public function getStatus() {