diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-01-11 12:35:47 +0100 |
commit | 19985dbb8c0aa66dc4bf7905abc1148de909097d (patch) | |
tree | 2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /vendor/maxmind/web-service-common/src/Exception/HttpException.php | |
download | 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst 1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip |
Diffstat (limited to 'vendor/maxmind/web-service-common/src/Exception/HttpException.php')
-rw-r--r-- | vendor/maxmind/web-service-common/src/Exception/HttpException.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/vendor/maxmind/web-service-common/src/Exception/HttpException.php b/vendor/maxmind/web-service-common/src/Exception/HttpException.php new file mode 100644 index 0000000..990ee79 --- /dev/null +++ b/vendor/maxmind/web-service-common/src/Exception/HttpException.php @@ -0,0 +1,40 @@ +<?php
+
+namespace MaxMind\Exception;
+
+/**
+ * This class represents an HTTP transport error.
+ */
+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();
+ }
+}
|