/**
  * Displays an error message
  *
  * @internal
  * @param \TYPO3\CMS\Extbase\Mvc\Exception\CommandException $exception
  * @return void
  */
 public function errorCommand(\TYPO3\CMS\Extbase\Mvc\Exception\CommandException $exception)
 {
     $this->outputLine($exception->getMessage());
     if ($exception instanceof \TYPO3\CMS\Extbase\Mvc\Exception\AmbiguousCommandIdentifierException) {
         $this->outputLine('Please specify the complete command identifier. Matched commands:');
         foreach ($exception->getMatchingCommands() as $matchingCommand) {
             $this->outputLine('    %s', array($matchingCommand->getCommandIdentifier()));
         }
     }
     $this->outputLine('');
     $this->outputLine('Enter "' . $this->request->getCallingScript() . ' help" for an overview of all available commands');
     $this->outputLine('or "' . $this->request->getCallingScript() . ' help <command identifier>" for a detailed description of the corresponding command.');
 }
示例#2
0
 /**
  * Overwrites parent constructor to be able to inject matching commands.
  *
  * @param string $message
  * @param int $code
  * @param \Exception|NULL $previousException
  * @param array $matchingCommands <\TYPO3\CMS\Extbase\Mvc\Cli\Command> $matchingCommands Commands that matched the command identifier
  * @see Exception
  */
 public function __construct($message = '', $code = 0, \Exception $previousException = null, array $matchingCommands)
 {
     $this->matchingCommands = $matchingCommands;
     parent::__construct($message, $code, $previousException);
 }