當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RequestException::__construct方法代碼示例

本文整理匯總了PHP中GuzzleHttp\Exception\RequestException::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP RequestException::__construct方法的具體用法?PHP RequestException::__construct怎麽用?PHP RequestException::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GuzzleHttp\Exception\RequestException的用法示例。


在下文中一共展示了RequestException::__construct方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param string             $message  Exception message
  * @param CommandTransaction $trans    Contextual transfer information
  * @param \Exception         $previous Previous exception (if any)
  */
 public function __construct($message, CommandTransaction $trans, \Exception $previous = null)
 {
     $this->trans = $trans;
     $request = $trans->request ?: new Request(null, null);
     $response = $trans->response;
     parent::__construct($message, $request, $response, $previous);
 }
開發者ID:artoscopus,項目名稱:command,代碼行數:12,代碼來源:CommandException.php

示例2: __construct

 public function __construct($message = null, $code = 0, Exception $previous = null)
 {
     switch ($code) {
         case 401:
             $message = 'Invalid token.';
             break;
         case 400:
             $message = 'Identifier not found or invalid email/email_lead data.';
             break;
     }
     parent::__construct($message, $code, $previous);
 }
開發者ID:rluders,項目名稱:rdstation,代碼行數:12,代碼來源:RDException.php

示例3: __construct

 /**
  * @param string            $message
  * @param RequestInterface  $request
  * @param ResponseInterface $response
  * @param Exception         $previous
  */
 public function __construct($message, RequestInterface $request, ResponseInterface $response = null, Exception $previous = null)
 {
     parent::__construct($message, $request, $response, $previous);
     $this->addContext(['request' => (string) $request, 'response' => (string) $response]);
 }
開發者ID:akentner,項目名稱:incoming-ftp,代碼行數:11,代碼來源:RequestException.php

示例4: __construct

 public function __construct($message, RequestException $e)
 {
     parent::__construct($message, $e->getRequest(), $e->getResponse(), $e);
 }
開發者ID:cmpas2,項目名稱:ayforrest,代碼行數:4,代碼來源:TokenExpiredException.php

示例5: __construct

 public function __construct($message, RequestInterface $request, \Exception $previous = null, array $handlerContext = [])
 {
     parent::__construct($message, $request, null, $previous, $handlerContext);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:4,代碼來源:ConnectException.php

示例6: __construct

 /**
  * @param string            $message
  * @param RequestInterface  $request
  * @param ResponseInterface $response
  * @param \Exception        $previous
  */
 public function __construct($message, RequestInterface $request, ResponseInterface $response = null, \Exception $previous = null)
 {
     parent::__construct($message, $request, $response, $previous);
 }
開發者ID:alcaeus,項目名稱:hipchat-commander,代碼行數:10,代碼來源:HipChatException.php

示例7: __construct

 /**
  * @param GuzzleRequestException $exception
  */
 public function __construct(GuzzleRequestException $exception)
 {
     $this->guzzleException = $exception;
     parent::__construct($exception->getMessage(), $exception->getRequest(), $exception->getResponse(), $exception);
 }
開發者ID:Hikariii,項目名稱:php-box-view,代碼行數:8,代碼來源:RequestException.php

示例8: __construct

 public function __construct(\GuzzleHttp\Exception\RequestException $exception)
 {
     parent::__construct($exception->getMessage(), $exception->getRequest(), $exception->getResponse(), $exception->getPrevious(), $exception->getHandlerContext());
 }
開發者ID:keika299,項目名稱:chap,代碼行數:4,代碼來源:RequestException.php

示例9: __construct

 public function __construct($message, $code, ConnectException $connectException = null)
 {
     $request = is_null($connectException) ? new HttpRequest('GET', 'http://example.com/') : $connectException->getRequest();
     parent::__construct($message, $request);
     $this->curlCode = $code;
 }
開發者ID:webignition,項目名稱:guzzle-curl-exception,代碼行數:6,代碼來源:Exception.php


注:本文中的GuzzleHttp\Exception\RequestException::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。