Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequestException.php

function RequestException::__construct

Same name in this branch
  1. 11.1.x vendor/php-http/httplug/src/Exception/RequestException.php \Http\Client\Exception\RequestException::__construct()
2 calls to RequestException::__construct()
BadResponseException::__construct in vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
BadResponseException::__construct in vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
1 method overrides RequestException::__construct()
BadResponseException::__construct in vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php

File

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

Class

RequestException
HTTP Request exception

Namespace

GuzzleHttp\Exception

Code

public function __construct(string $message, RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $previous = null, array $handlerContext = []) {
    // Set the code of the exception if the response is set and not future.
    $code = $response ? $response->getStatusCode() : 0;
    parent::__construct($message, $code, $previous);
    $this->request = $request;
    $this->response = $response;
    $this->handlerContext = $handlerContext;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal