コード例 #1
0
ファイル: HttpException.php プロジェクト: backplane/elastica
 /**
  * Construct Exception
  *
  * @param string             $error    Error
  * @param \Elastica\Request  $request
  * @param \Elastica\Response $response
  */
 public function __construct($error, Request $request = null, Response $response = null)
 {
     $this->_error = $error;
     $message = $this->getErrorMessage($this->getError());
     parent::__construct($message, $request, $response);
 }
 /**
  * @param \GuzzleHttp\Exception\TransferException $guzzleException
  * @param \Elastica\Request                       $request
  * @param \Elastica\Response                      $response
  */
 public function __construct(TransferException $guzzleException, Request $request = null, Response $response = null)
 {
     $this->_guzzleException = $guzzleException;
     $message = $this->getErrorMessage($this->getGuzzleException());
     parent::__construct($message, $request, $response);
 }
コード例 #3
0
 /**
  * @param \Thrift\Exception\TException $thriftException
  * @param \Elastica\Request            $request
  * @param \Elastica\Response           $response
  */
 public function __construct(TException $thriftException, Request $request = null, Response $response = null)
 {
     $this->_thriftException = $thriftException;
     $message = $this->getErrorMessage($this->getThriftException());
     parent::__construct($message, $request, $response);
 }