3 namespace Drupal\migrate\Plugin\Exception;
5 use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
8 * Defines a class for bad plugin definition exceptions.
10 class BadPluginDefinitionException extends InvalidPluginDefinitionException {
13 * Constructs a BadPluginDefinitionException.
15 * For the remaining parameters see \Exception.
17 * @param string $plugin_id
18 * The plugin ID of the mapper.
19 * @param string $property
20 * The name of the property that is missing from the plugin.
24 public function __construct($plugin_id, $property, $code = 0, \Exception $previous = NULL) {
25 $message = sprintf('The %s plugin must define the %s property.', $plugin_id, $property);
26 parent::__construct($plugin_id, $message, $code, $previous);