Skip to content

Commit

Permalink
TASK: Extends exception message with NodeType name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
markusguenther committed Dec 15, 2023
1 parent e232a85 commit e7b74c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Neos.ContentRepository.Core/Classes/NodeType/NodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down

0 comments on commit e7b74c6

Please sign in to comment.