You are here

class InvalidRequestException in Smart IP 7.2

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

Thrown when a MaxMind web service returns an error relating to the request.

Hierarchy

Expanded class hierarchy of InvalidRequestException

1 file declares its use of InvalidRequestException
Client.php in includes/vendor/maxmind/web-service-common/src/WebService/Client.php

File

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

Namespace

MaxMind\Exception
View source
class InvalidRequestException extends HttpException {

  /**
   * The code returned by the MaxMind web service
   */
  private $error;

  /**
   * @param string $message The exception message
   * @param int $error The error code returned by the MaxMind web service
   * @param int $httpStatus The HTTP status code of the response
   * @param string $uri The URI queries
   * @param \Exception $previous The previous exception, if any.
   */
  public function __construct($message, $error, $httpStatus, $uri, \Exception $previous = null) {
    $this->error = $error;
    parent::__construct($message, $httpStatus, $uri, $previous);
  }
  public function getErrorCode() {
    return $this->error;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HttpException::$uri private property The URI queried
HttpException::getStatusCode public function
HttpException::getUri public function
InvalidRequestException::$error private property The code returned by the MaxMind web service
InvalidRequestException::getErrorCode public function
InvalidRequestException::__construct public function Overrides HttpException::__construct