Mercurial > hg > isophonics-drupal-site
diff core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/migrate/src/Plugin/Exception/BadPluginDefinitionException.php Mon Apr 23 09:46:53 2018 +0100 @@ -0,0 +1,29 @@ +<?php + +namespace Drupal\migrate\Plugin\Exception; + +use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException; + +/** + * Defines a class for bad plugin definition exceptions. + */ +class BadPluginDefinitionException extends InvalidPluginDefinitionException { + + /** + * Constructs a BadPluginDefinitionException. + * + * For the remaining parameters see \Exception. + * + * @param string $plugin_id + * The plugin ID of the mapper. + * @param string $property + * The name of the property that is missing from the plugin. + * + * @see \Exception + */ + public function __construct($plugin_id, $property, $code = 0, \Exception $previous = NULL) { + $message = sprintf('The %s plugin must define the %s property.', $plugin_id, $property); + parent::__construct($plugin_id, $message, $code, $previous); + } + +}