From d453424b1df22fbd9b895990b216153415087205 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Wed, 3 Jul 2024 13:42:37 +0200 Subject: [PATCH] Describe DescriptorNotRegisteredException --- src/Type/Doctrine/DefaultDescriptorRegistry.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Type/Doctrine/DefaultDescriptorRegistry.php b/src/Type/Doctrine/DefaultDescriptorRegistry.php index 2fc81131..83647e3b 100644 --- a/src/Type/Doctrine/DefaultDescriptorRegistry.php +++ b/src/Type/Doctrine/DefaultDescriptorRegistry.php @@ -25,13 +25,13 @@ public function get(string $type): DoctrineTypeDescriptor { $typesMap = Type::getTypesMap(); if (!isset($typesMap[$type])) { - throw new DescriptorNotRegisteredException(); + throw new DescriptorNotRegisteredException($type); } /** @var class-string $typeClass */ $typeClass = $typesMap[$type]; if (!isset($this->descriptors[$typeClass])) { - throw new DescriptorNotRegisteredException(); + throw new DescriptorNotRegisteredException($typeClass); } return $this->descriptors[$typeClass]; } @@ -42,7 +42,7 @@ public function get(string $type): DoctrineTypeDescriptor public function getByClassName(string $className): DoctrineTypeDescriptor { if (!isset($this->descriptors[$className])) { - throw new DescriptorNotRegisteredException(); + throw new DescriptorNotRegisteredException($className); } return $this->descriptors[$className]; }