Skip to content

Commit d453424

Browse files
committed
Describe DescriptorNotRegisteredException
1 parent c87ee29 commit d453424

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Type/Doctrine/DefaultDescriptorRegistry.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ public function get(string $type): DoctrineTypeDescriptor
2525
{
2626
$typesMap = Type::getTypesMap();
2727
if (!isset($typesMap[$type])) {
28-
throw new DescriptorNotRegisteredException();
28+
throw new DescriptorNotRegisteredException($type);
2929
}
3030

3131
/** @var class-string<Type> $typeClass */
3232
$typeClass = $typesMap[$type];
3333
if (!isset($this->descriptors[$typeClass])) {
34-
throw new DescriptorNotRegisteredException();
34+
throw new DescriptorNotRegisteredException($typeClass);
3535
}
3636
return $this->descriptors[$typeClass];
3737
}
@@ -42,7 +42,7 @@ public function get(string $type): DoctrineTypeDescriptor
4242
public function getByClassName(string $className): DoctrineTypeDescriptor
4343
{
4444
if (!isset($this->descriptors[$className])) {
45-
throw new DescriptorNotRegisteredException();
45+
throw new DescriptorNotRegisteredException($className);
4646
}
4747
return $this->descriptors[$className];
4848
}

0 commit comments

Comments
 (0)