protected function prepareDatabaseException(\PDOException $pdoException, string $query, array $criteria = []): DatabaseException {
		$databaseException = new DatabaseException(
			$pdoException->getMessage(),
			(int)$pdoException->getCode(),
			$pdoException
		);
		
		$query = $this->getStatement($query, $criteria);
		$databaseException->setQuery($query);
		return $databaseException;
	}