You are here

public function PluginNotFoundException::__construct in Plug 7

Construct an PluginNotFoundException exception.

Parameters

string $plugin_id: The plugin ID that was not found.

See also

\Exception for remaining parameters.

File

lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php, line 23
Contains \Drupal\Component\Plugin\Exception\PluginNotFoundException.

Class

PluginNotFoundException
Plugin exception class to be thrown when a plugin ID could not be found.

Namespace

Drupal\Component\Plugin\Exception

Code

public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
  if (empty($message)) {
    $message = sprintf("Plugin ID '%s' was not found.", $plugin_id);
  }
  parent::__construct($message, $code, $previous);
}