PHP Class Elastica\Exception\ElasticsearchException

Author: Ian Babrou ([email protected])
Inheritance: extends Exception
Show file Open project: ruflin/elastica

Protected Properties

Property Type Description
$_error Error array

Public Methods

Method Description
__construct ( integer $code, array $error ) Constructs elasticsearch exception.
getError ( ) : array
getExceptionName ( ) : string | null Returns elasticsearch exception name.
isRemoteTransportException ( ) : boolean Returns whether exception was local to server node or remote.

Protected Methods

Method Description
_extractException ( string $error ) : null | string Extract exception name from error response.
_parseError ( string $error ) Parse error message from elasticsearch.

Method Details

__construct() public method

Constructs elasticsearch exception.
public __construct ( integer $code, array $error )
$code integer Error code
$error array Error object from elasticsearch

_extractException() protected method

Extract exception name from error response.
protected _extractException ( string $error ) : null | string
$error string
return null | string

_parseError() protected method

Parse error message from elasticsearch.
protected _parseError ( string $error )
$error string Error message

getError() public method

public getError ( ) : array
return array Error array

getExceptionName() public method

Returns elasticsearch exception name.
public getExceptionName ( ) : string | null
return string | null

isRemoteTransportException() public method

Returns whether exception was local to server node or remote.

Property Details

$_error protected property

Error array
protected $_error