Elastica\Exception\ElasticsearchException::_parseError PHP Method

_parseError() protected method

Parse error message from elasticsearch.
protected _parseError ( string $error )
$error string Error message
    protected function _parseError($error)
    {
        $errors = explode(']; nested: ', $error);
        if (count($errors) == 1) {
            $this->_exception = $this->_extractException($errors[0]);
        } else {
            if ($this->_extractException($errors[0]) == self::REMOTE_TRANSPORT_EXCEPTION) {
                $this->_isRemote = true;
                $this->_exception = $this->_extractException($errors[1]);
            } else {
                $this->_exception = $this->_extractException($errors[0]);
            }
        }
    }