aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Exception
diff options
context:
space:
mode:
authorwinter2025-01-14 17:04:57 +0000
committerwinter2025-01-14 17:04:57 +0000
commitd7940cf9470ee8377cf6484f4a20869c62d48685 (patch)
tree7d6848093e1111636b380e894fda89562f9278d8 /Digitigrade/Exception
parent3ce58a33945fc858ac4f8b2b8471dff0cf294863 (diff)
don't retry pushing to an instance with no push endpoint
Diffstat (limited to 'Digitigrade/Exception')
-rw-r--r--Digitigrade/Exception/EndpointMissingException.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/Digitigrade/Exception/EndpointMissingException.php b/Digitigrade/Exception/EndpointMissingException.php
new file mode 100644
index 0000000..b347838
--- /dev/null
+++ b/Digitigrade/Exception/EndpointMissingException.php
@@ -0,0 +1,23 @@
+<?php
+namespace Digitigrade\Exception;
+
+use Digitigrade\Model\Instance;
+
+class EndpointMissingException extends \RuntimeException {
+ protected Instance $instance;
+ protected string $endpointName;
+
+ public function __construct(Instance $instance, string $endpointName, \Throwable $previous = null) {
+ parent::__construct("Instance $instance->domain has no $endpointName endpoint", previous: $previous);
+ $this->instance = $instance;
+ $this->endpointName = $endpointName;
+ }
+
+ public function getInstance(): Instance {
+ return $this->instance;
+ }
+
+ public function getEndpointName(): string {
+ return $this->endpointName;
+ }
+} \ No newline at end of file