public function error($which_connection='')
    {
        $con = $this->getNamedConnection($which_connection);

        if (!is_object($con)) {
            if ($this->last_connect_error) {
                return $this->last_connect_error;
            }

            return 'No database connection';
        }

        return $con->ErrorMsg();
    }