lithium\data\source\Database::_error()

protected method

Throw a QueryException error

Parameters

  • string $sql

    The offending SQL string

Filter

This method can be filtered.

Source

	protected function _error($sql){
		$params = compact('sql');

		return Filters::run($this, __FUNCTION__, $params, function($params) {
			list($code, $error) = $this->error();
			throw new QueryException("{$params['sql']}: {$error}", $code);
		});
	}