[ Index ] |
PHP Cross Reference of YOURLS |
[Summary view] [Print] [Text view]
1 <?php 2 3 declare(strict_types=1); 4 5 namespace MaxMind\Exception; 6 7 /** 8 * Thrown when a MaxMind web service returns an error relating to the request. 9 */ 10 class InvalidRequestException extends HttpException 11 { 12 /** 13 * The code returned by the MaxMind web service. 14 * 15 * @var string 16 */ 17 private $error; 18 19 /** 20 * @param string $message the exception message 21 * @param string $error the error code returned by the MaxMind web service 22 * @param int $httpStatus the HTTP status code of the response 23 * @param string $uri the URI queries 24 * @param \Exception $previous the previous exception, if any 25 */ 26 public function __construct( 27 string $message, 28 string $error, 29 int $httpStatus, 30 string $uri, 31 \Exception $previous = null 32 ) { 33 $this->error = $error; 34 parent::__construct($message, $httpStatus, $uri, $previous); 35 } 36 37 public function getErrorCode(): string 38 { 39 return $this->error; 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sat Nov 9 05:10:01 2024 | Cross-referenced by PHPXref 0.7.1 |