diff --git a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php index cec5bd900a5..75cef7fa24f 100644 --- a/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php +++ b/Neos.ContentRepository.Core/Classes/NodeType/NodeTypeManager.php @@ -16,7 +16,6 @@ use Neos\ContentRepository\Core\SharedModel\Exception\NodeConfigurationException; use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeIsFinalException; -use Neos\ContentRepository\Core\SharedModel\Exception\NodeTypeNotFound; use Neos\ContentRepository\Core\SharedModel\Node\NodeName; use Neos\Utility\Arrays; use Neos\Utility\Exception\PropertyNotAccessibleException; @@ -106,8 +105,6 @@ public function getSubNodeTypes(string|NodeTypeName $superTypeName, bool $includ /** * Returns the specified node type (which could be abstract) - * - * @throws NodeTypeNotFound */ public function getNodeType(string|NodeTypeName $nodeTypeName): ?NodeType { @@ -242,7 +239,6 @@ public function isNodeTypeAllowedAsChildToTetheredNode(NodeTypeName $parentNodeT * @param array $completeNodeTypeConfiguration the full node type configuration for all node types * @throws NodeConfigurationException * @throws NodeTypeIsFinalException - * @throws NodeTypeNotFound */ private function loadNodeType(string $nodeTypeName, array &$completeNodeTypeConfiguration): NodeType { @@ -251,7 +247,8 @@ private function loadNodeType(string $nodeTypeName, array &$completeNodeTypeConf } if (!isset($completeNodeTypeConfiguration[$nodeTypeName])) { - throw new NodeTypeNotFound('Node type "' . $nodeTypeName . '" does not exist', 1316451800); + // only thrown if a programming error occurred. + throw new \RuntimeException('Must not happen, logic error: Node type "' . $nodeTypeName . '" does not exist', 1316451800); } $nodeTypeConfiguration = $completeNodeTypeConfiguration[$nodeTypeName];