You are here

class MigrateException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/MigrateException.php \Drupal\migrate\MigrateException

Defines the migrate exception class.

Hierarchy

Expanded class hierarchy of MigrateException

23 files declare their use of MigrateException
Concat.php in core/modules/migrate/src/Plugin/migrate/process/Concat.php
Contains \Drupal\migrate\Plugin\migrate\process\Concat.
ConvertTokens.php in core/modules/user/src/Plugin/migrate/process/ConvertTokens.php
Contains \Drupal\user\Plugin\migrate\process\ConvertTokens.
DedupeBase.php in core/modules/migrate/src/Plugin/migrate/process/DedupeBase.php
Contains \Drupal\migrate\Plugin\migrate\process\DedupeBase.
EntityComment.php in core/modules/comment/src/Plugin/migrate/destination/EntityComment.php
Contains \Drupal\comment\Plugin\migrate\destination\EntityComment.
EntityConfigBase.php in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Contains \Drupal\migrate\Plugin\migrate\destination\EntityConfigBase.

... See full list

File

core/modules/migrate/src/MigrateException.php, line 16
Contains \Drupal\migrate\MigrateException.

Namespace

Drupal\migrate
View source
class MigrateException extends \Exception {

  /**
   * The level of the error being reported.
   *
   * The value is a Migration::MESSAGE_* constant.
   *
   * @var int
   */
  protected $level;

  /**
   * The status to record in the map table for the current item.
   *
   * The value is a MigrateMap::STATUS_* constant.
   *
   * @var int
   */
  protected $status;

  /**
   * Constructs a MigrateException object.
   *
   * @param string $message
   *   The message for the exception.
   * @param int $code
   *   The Exception code.
   * @param \Exception $previous
   *   The previous exception used for the exception chaining.
   * @param int $level
   *   The level of the error, a Migration::MESSAGE_* constant.
   * @param int $status
   *   The status of the item for the map table, a MigrateMap::STATUS_*
   *   constant.
   */
  public function __construct($message = NULL, $code = 0, \Exception $previous = NULL, $level = MigrationInterface::MESSAGE_ERROR, $status = MigrateIdMapInterface::STATUS_FAILED) {
    $this->level = $level;
    $this->status = $status;
    parent::__construct($message);
  }

  /**
   * Gets the level.
   *
   * @return int
   *   An integer status code. @see Migration::MESSAGE_*
   */
  public function getLevel() {
    return $this->level;
  }

  /**
   * Gets the status of the current item.
   *
   * @return int
   *   An integer status code. @see MigrateMap::STATUS_*
   */
  public function getStatus() {
    return $this->status;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateException::$level protected property The level of the error being reported.
MigrateException::$status protected property The status to record in the map table for the current item.
MigrateException::getLevel public function Gets the level.
MigrateException::getStatus public function Gets the status of the current item.
MigrateException::__construct public function Constructs a MigrateException object.