Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/migrate/src/Audit/AuditException.php @ 0:c75dbcec494b
Initial commit from drush-created site
| author | Chris Cannam |
|---|---|
| date | Thu, 05 Jul 2018 14:24:15 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:c75dbcec494b |
|---|---|
| 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 } |
