public function raiseError() {
		$error = $this->getError();

		if ($error === false) {
			return;
		}

		$this->_error = false;
		if ($error['offset'] == 0) {
			$message = sprintf('%s', $error['message']);
		}
		else {
			$message = sprintf('%s in %s at %s', $error['message'], $error['sqltext'], $error['offset']);
		}
		switch($this->getAttribute(PDO::ATTR_ERRMODE)) {
			case PDO::ERRMODE_SILENT:
				$message = sprintf('(%s) Error ' . $message, date('Y-m-d H:i:s'));
				error_log($message);
				break;
			case PDO::ERRMODE_WARNING:
				$message = 'Error ' . $message;
				$message = htmlentities($message, ENT_QUOTES);
				trigger_error($message, E_USER_ERROR);
				break;
			case PDO::ERRMODE_EXCEPTION:
			default:
				throw new Exception($message, $error['code']);
		}
	}