3 namespace Drupal\Component\Plugin\Exception;
6 * Plugin exception class to be thrown when a plugin ID could not be found.
8 class PluginNotFoundException extends PluginException {
11 * Construct an PluginNotFoundException exception.
13 * For the remaining parameters see \Exception.
15 * @param string $plugin_id
16 * The plugin ID that was not found.
20 public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
21 if (empty($message)) {
22 $message = sprintf("Plugin ID '%s' was not found.", $plugin_id);
24 parent::__construct($message, $code, $previous);