function AuditException::__construct

Same name in other branches
  1. 9 core/modules/migrate/src/Audit/AuditException.php \Drupal\migrate\Audit\AuditException::__construct()
  2. 10 core/modules/migrate/src/Audit/AuditException.php \Drupal\migrate\Audit\AuditException::__construct()
  3. 11.x core/modules/migrate/src/Audit/AuditException.php \Drupal\migrate\Audit\AuditException::__construct()

AuditException constructor.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration that caused the exception.

string $message: The reason the audit failed.

\Exception $previous: (optional) The previous exception.

File

core/modules/migrate/src/Audit/AuditException.php, line 22

Class

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

Namespace

Drupal\migrate\Audit

Code

public function __construct(MigrationInterface $migration, $message, \Exception $previous = NULL) {
    $message = sprintf('Cannot audit migration %s: %s', $migration->id(), $message);
    parent::__construct($message, 0, $previous);
}

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