Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-driver / src / Drupal / Driver / Exception / UnsupportedDriverActionException.php
diff --git a/vendor/drupal/drupal-driver/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php b/vendor/drupal/drupal-driver/src/Drupal/Driver/Exception/UnsupportedDriverActionException.php
new file mode 100644 (file)
index 0000000..7e2ce40
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+
+namespace Drupal\Driver\Exception;
+
+use Drupal\Driver\DriverInterface;
+
+/**
+ * Unsupported driver action.
+ */
+class UnsupportedDriverActionException extends Exception {
+
+  /**
+   * Initializes exception.
+   *
+   * @param string $template
+   *   What is unsupported?
+   * @param DriverInterface $driver
+   *   Driver instance.
+   * @param int $code
+   *   The exception code.
+   * @param \Exception $previous
+   *   Previous exception.
+   */
+  public function __construct($template, DriverInterface $driver, $code = 0, \Exception $previous = NULL) {
+    $message = sprintf($template, get_class($driver));
+
+    parent::__construct($message, $driver, $code, $previous);
+  }
+
+}