[TASK] Print controller->action if required argument is not set 37/39737/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 26 May 2015 09:36:34 +0000 (11:36 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Tue, 26 May 2015 15:13:00 +0000 (17:13 +0200)
Extend the exception message to hint to the action of the controller
that misses a required argument.

Resolves: #67139
Releases: master, 6.2
Change-Id: I70a256d73545ad90852fd1165f2fde127ac12441
Reviewed-on: http://review.typo3.org/39737
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php

index 0ed081d..fd42d3e 100644 (file)
@@ -398,7 +398,7 @@ abstract class AbstractController implements ControllerInterface {
                        if ($this->request->hasArgument($argumentName)) {
                                $argument->setValue($this->request->getArgument($argumentName));
                        } elseif ($argument->isRequired()) {
-                               throw new \TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException('Required argument "' . $argumentName . '" is not set.', 1298012500);
+                               throw new \TYPO3\CMS\Extbase\Mvc\Controller\Exception\RequiredArgumentMissingException('Required argument "' . $argumentName . '" is not set for ' . $this->request->getControllerObjectName() . '->' . $this->request->getControllerActionName() . '.', 1298012500);
                        }
                }
        }