You are here

public function RequestException::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Exception/RequestException.php \GuzzleHttp\Exception\RequestException::__construct()
1 call to RequestException::__construct()
ConnectException::__construct in vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
1 method overrides RequestException::__construct()
ConnectException::__construct in vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

File

vendor/guzzlehttp/guzzle/src/Exception/RequestException.php, line 22

Class

RequestException
HTTP Request exception

Namespace

GuzzleHttp\Exception

Code

public function __construct($message, RequestInterface $request, ResponseInterface $response = null, \Exception $previous = null, array $handlerContext = []) {

  // Set the code of the exception if the response is set and not future.
  $code = $response && !$response instanceof PromiseInterface ? $response
    ->getStatusCode() : 0;
  parent::__construct($message, $code, $previous);
  $this->request = $request;
  $this->response = $response;
  $this->handlerContext = $handlerContext;
}