comparison core/lib/Drupal/Component/Plugin/Exception/PluginNotFoundException.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Component\Plugin\Exception;
4
5 /**
6 * Plugin exception class to be thrown when a plugin ID could not be found.
7 */
8 class PluginNotFoundException extends PluginException {
9
10 /**
11 * Construct an PluginNotFoundException exception.
12 *
13 * For the remaining parameters see \Exception.
14 *
15 * @param string $plugin_id
16 * The plugin ID that was not found.
17 *
18 * @see \Exception
19 */
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);
23 }
24 parent::__construct($message, $code, $previous);
25 }
26
27 }