2013-05-08 14:42:13 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace GeoIP2\Exception;
|
|
|
|
|
2013-05-10 10:47:11 -07:00
|
|
|
/**
|
2013-05-20 15:38:21 -07:00
|
|
|
* This class represents an error returned by MaxMind's GeoIP2
|
2013-05-10 10:47:11 -07:00
|
|
|
* web service.
|
|
|
|
*/
|
2013-05-13 10:29:14 -07:00
|
|
|
class WebServiceException extends HttpException
|
2013-05-08 14:42:13 -07:00
|
|
|
{
|
2013-05-10 10:47:11 -07:00
|
|
|
/**
|
|
|
|
* The code returned by the MaxMind web service
|
|
|
|
*/
|
|
|
|
public $error;
|
2013-05-08 14:42:13 -07:00
|
|
|
|
2013-05-09 07:29:29 -07:00
|
|
|
public function __construct(
|
|
|
|
$message,
|
2013-05-10 10:47:11 -07:00
|
|
|
$error,
|
2013-05-09 07:29:29 -07:00
|
|
|
$httpStatus,
|
|
|
|
$uri,
|
|
|
|
Exception $previous = null
|
|
|
|
) {
|
2013-05-10 10:47:11 -07:00
|
|
|
$this->error = $error;
|
|
|
|
parent::__construct($message, $httpStatus, $uri, $previous);
|
2013-05-09 07:29:29 -07:00
|
|
|
}
|
|
|
|
}
|