[TASK] Make Exception message more helpful 97/40697/3
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 27 Jun 2015 16:40:13 +0000 (18:40 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 27 Jun 2015 16:44:51 +0000 (18:44 +0200)
Let the missing hookobject tell, what class it is, in order to
find the place where the interface might be missing.

Change-Id: I5a654384005b74e1256ab2019e936c7da7a76ab6
Resolves: #67787
Releases: master
Reviewed-on: http://review.typo3.org/40697
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Core/Bootstrap.php

index b7ded39..129205e 100644 (file)
@@ -1037,7 +1037,10 @@ class Bootstrap {
                                /** @var $hookObject \TYPO3\CMS\Core\Database\TableConfigurationPostProcessingHookInterface */
                                $hookObject = Utility\GeneralUtility::getUserObj($classReference);
                                if (!$hookObject instanceof \TYPO3\CMS\Core\Database\TableConfigurationPostProcessingHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Core\\Database\\TableConfigurationPostProcessingHookInterface', 1320585902);
+                                       throw new \UnexpectedValueException(
+                                               '$hookObject "' . $classReference . '" must implement interface TYPO3\\CMS\\Core\\Database\\TableConfigurationPostProcessingHookInterface',
+                                               1320585902
+                                       );
                                }
                                $hookObject->processData();
                        }