3 namespace Drupal\Driver\Exception;
5 use Drupal\Driver\DriverInterface;
8 * Drupal driver manager base exception class.
10 abstract class Exception extends \Exception {
14 * Initializes Drupal driver manager exception.
16 * @param string $message
17 * The exception message.
18 * @param DriverInterface $driver
19 * The driver where the exception occurred.
21 * Optional exception code. Defaults to 0.
22 * @param \Exception $previous
23 * Optional previous exception that was thrown.
25 public function __construct($message, DriverInterface $driver = NULL, $code = 0, \Exception $previous = NULL) {
26 $this->driver = $driver;
28 parent::__construct($message, $code, $previous);
32 * Returns exception session.
35 * The exception session.
37 public function getDriver() {