getMessage(); } else { $message = 'An exception occurred in the driver: ' . $driverException->getMessage(); } parent::__construct($message, $driverException->getCode(), $driverException); $this->query = $query; } /** * {@inheritDoc} */ public function getSQLState() { $previous = $this->getPrevious(); assert($previous instanceof TheDriverException); return $previous->getSQLState(); } public function getQuery(): ?Query { return $this->query; } }