[TASK] Make "No renderType definition" exception more verbose 10/48010/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 4 May 2016 16:22:10 +0000 (18:22 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 4 May 2016 18:13:28 +0000 (20:13 +0200)
To make the exception message more helpful, it contains now
the table name and the field name of the bogus TCA.

Resolves: #76051
Releases: master, 7.6
Change-Id: I93ca6ebde517756da14e7171d42cdcd8ef598888
Reviewed-on: https://review.typo3.org/48010
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/NodeFactory.php

index d6b4273..ddeafba 100644 (file)
@@ -92,7 +92,10 @@ class NodeFactory
     public function create(array $data)
     {
         if (empty($data['renderType'])) {
-            throw new Exception('No renderType definition found', 1431452406);
+            throw new Exception(
+                'Missing "renderType" in TCA of field "[' . $data['tableName'] . '][' . $data['fieldName'] . ']".',
+                1431452406
+            );
         }
         $type = $data['renderType'];