当前位置: 首页>>代码示例>>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;未经允许,请勿转载。