lithium\data\source\Database::_error()
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 $this->_filter(__METHOD__, $params, function($self, $params) {
$sql = $params['sql'];
list($code, $error) = $self->error();
throw new QueryException("{$sql}: {$error}", $code);
});
}