AuditException.php

Same filename in other branches
  1. 9 core/modules/migrate/src/Audit/AuditException.php
  2. 8.9.x core/modules/migrate/src/Audit/AuditException.php
  3. 10 core/modules/migrate/src/Audit/AuditException.php

Namespace

Drupal\migrate\Audit

File

core/modules/migrate/src/Audit/AuditException.php

View source
<?php

namespace Drupal\migrate\Audit;

use Drupal\migrate\Plugin\MigrationInterface;

/**
 * Defines an exception to throw if an error occurs during a migration audit.
 */
class AuditException extends \RuntimeException {
    
    /**
     * AuditException constructor.
     *
     * @param \Drupal\migrate\Plugin\MigrationInterface $migration
     *   The migration that caused the exception.
     * @param string $message
     *   The reason the audit failed.
     * @param \Exception $previous
     *   (optional) The previous exception.
     */
    public function __construct(MigrationInterface $migration, $message, ?\Exception $previous = NULL) {
        $message = sprintf('Cannot audit migration %s: %s', $migration->id(), $message);
        parent::__construct($message, 0, $previous);
    }

}

Classes

Title Deprecated Summary
AuditException Defines an exception to throw if an error occurs during a migration audit.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.