Mercurial > hg > isophonics-drupal-site
comparison core/modules/migrate/src/Audit/AuditException.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\migrate\Audit; | |
4 | |
5 use Drupal\migrate\Plugin\MigrationInterface; | |
6 | |
7 /** | |
8 * Defines an exception to throw if an error occurs during a migration audit. | |
9 */ | |
10 class AuditException extends \RuntimeException { | |
11 | |
12 /** | |
13 * AuditException constructor. | |
14 * | |
15 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
16 * The migration that caused the exception. | |
17 * @param string $message | |
18 * The reason the audit failed. | |
19 * @param \Exception $previous | |
20 * (optional) The previous exception. | |
21 */ | |
22 public function __construct(MigrationInterface $migration, $message, \Exception $previous = NULL) { | |
23 $message = sprintf('Cannot audit migration %s: %s', $migration->id(), $message); | |
24 parent::__construct($message, 0, $previous); | |
25 } | |
26 | |
27 } |