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

Breadcrumb

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

function HttpException::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/http-kernel/Exception/HttpException.php \Symfony\Component\HttpKernel\Exception\HttpException::__construct()

Parameters

string $message:

Overrides RequestException::__construct

File

vendor/php-http/httplug/src/Exception/HttpException.php, line 25

Class

HttpException
Thrown when a response was received but the request itself failed.

Namespace

Http\Client\Exception

Code

public function __construct($message, RequestInterface $request, ResponseInterface $response, ?\Exception $previous = null) {
    parent::__construct($message, $request, $previous);
    $this->response = $response;
    $this->code = $response->getStatusCode();
}
RSS feed
Powered by Drupal