From e7b74c6f4deaabaac1ef841b8fb81250ef4d846a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Gu=CC=88nther?= Date: Fri, 15 Dec 2023 17:35:17 +0100 Subject: [PATCH] TASK: Extends exception message with NodeType name When the NodeType property name is not available for the given NodeType we throw an exception. The exception method only mentions the property name, and that can be irritating when you have multiple NodeTypes with that property name or multiple errors. So this change extends the error message with the current NodeType name. --- Neos.ContentRepository.Core/Classes/NodeType/NodeType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php index f1e861f3beb..6d6369eb3e8 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeType.php @@ -420,7 +420,7 @@ public function getPropertyType(string $propertyName): string if (!$this->hasProperty($propertyName)) { throw new \InvalidArgumentException( - sprintf('NodeType schema has no property "%s" configured. Cannot read its type.', $propertyName), + sprintf('NodeType schema has no property "%s" configured for the NodeType "%s". Cannot read its type.', $propertyName, $this->name->value), 1695062252040 ); }