You are here

class HttpException in Smart IP 6.2

Same name in this branch
  1. 6.2 includes/vendor/maxmind/web-service-common/src/Exception/HttpException.php \MaxMind\Exception\HttpException
  2. 6.2 includes/vendor/geoip2/geoip2/src/Exception/HttpException.php \GeoIp2\Exception\HttpException
Same name and namespace in other branches
  1. 7.2 includes/vendor/maxmind/web-service-common/src/Exception/HttpException.php \MaxMind\Exception\HttpException

This class represents an HTTP transport error.

Hierarchy

Expanded class hierarchy of HttpException

2 files declare their use of HttpException
Client.php in includes/vendor/maxmind/web-service-common/src/WebService/Client.php
CurlRequest.php in includes/vendor/maxmind/web-service-common/src/WebService/Http/CurlRequest.php

File

includes/vendor/maxmind/web-service-common/src/Exception/HttpException.php, line 8

Namespace

MaxMind\Exception
View source
class HttpException extends WebServiceException {

  /**
   * The URI queried
   */
  private $uri;

  /**
   * @param string $message A message describing the error.
   * @param int $httpStatus The HTTP status code of the response
   * @param string $uri The URI used in the request.
   * @param \Exception $previous The previous exception, if any.
   */
  public function __construct($message, $httpStatus, $uri, \Exception $previous = null) {
    $this->uri = $uri;
    parent::__construct($message, $httpStatus, $previous);
  }
  public function getUri() {
    return $this->uri;
  }
  public function getStatusCode() {
    return $this
      ->getCode();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpException::$uri private property The URI queried
HttpException::getStatusCode public function
HttpException::getUri public function
HttpException::__construct public function 2