# sqlite-database-integration/2.2.21/wp-includes/database/sqlite/class-wp-sqlite-driver-exception.php

SQLite Database Integration, version 2.2.21. 34 lines.

- Page: https://pluginprobe.com/plugins/sqlite-database-integration/2.2.21/code/wp-includes/database/sqlite/class-wp-sqlite-driver-exception.php
- Raw: https://pluginprobe.com/plugins/sqlite-database-integration/2.2.21/raw/wp-includes/database/sqlite/class-wp-sqlite-driver-exception.php
- Modified: 2026-04-03T13:06:10+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sqlite-database-integration/2.2.21/code/wp-includes/database/sqlite/class-wp-sqlite-driver-exception.php#L10-L20`.

```php
<?php

class WP_SQLite_Driver_Exception extends PDOException {
	/**
	 * The SQLite driver that originated the exception.
	 *
	 * @var WP_PDO_MySQL_On_SQLite
	 */
	private $driver;

	/**
	 * Constructor.
	 *
	 * @param WP_PDO_MySQL_On_SQLite $driver The SQLite driver that originated the exception.
	 * @param string                 $message  The exception message.
	 * @param int|string             $code     The exception code. In PDO, it can be a string with value of SQLSTATE.
	 * @param Throwable|null         $previous The previous throwable used for the exception chaining.
	 */
	public function __construct(
		WP_PDO_MySQL_On_SQLite $driver,
		string $message,
		$code = 0,
		?Throwable $previous = null
	) {
		parent::__construct( $message, 0, $previous );
		$this->code   = $code;
		$this->driver = $driver;
	}

	public function getDriver(): WP_PDO_MySQL_On_SQLite {
		return $this->driver;
	}
}

```
