diff options
Diffstat (limited to 'Digitigrade/Exception/EndpointMissingException.php')
| -rw-r--r-- | Digitigrade/Exception/EndpointMissingException.php | 23 |
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 |
