Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommandNotFoundException.php

class CommandNotFoundException

Represents an incorrect command name typed in the console.

@author Jérôme Tamarelle <jerome@tamarelle.net>

Hierarchy

  • class \Symfony\Component\Console\Exception\InvalidArgumentException extends \Symfony\Component\Console\Exception\InvalidArgumentException implements \Symfony\Component\Console\Exception\ExceptionInterface
    • class \Symfony\Component\Console\Exception\InvalidArgumentException extends \Symfony\Component\Console\Exception\InvalidArgumentException implements \Symfony\Component\Console\Exception\ExceptionInterface
      • class \Symfony\Component\Console\Exception\CommandNotFoundException extends \Symfony\Component\Console\Exception\InvalidArgumentException implements \Symfony\Component\Console\Exception\ExceptionInterface

Expanded class hierarchy of CommandNotFoundException

7 files declare their use of CommandNotFoundException
Application.php in vendor/composer/composer/src/Composer/Console/Application.php
Application.php in vendor/symfony/console/Application.php
ApplicationDescription.php in vendor/symfony/console/Descriptor/ApplicationDescription.php
CommandLoaderInterface.php in vendor/symfony/console/CommandLoader/CommandLoaderInterface.php
CompleteCommand.php in vendor/symfony/console/Command/CompleteCommand.php

... See full list

File

vendor/symfony/console/Exception/CommandNotFoundException.php, line 19

Namespace

Symfony\Component\Console\Exception
View source
class CommandNotFoundException extends \InvalidArgumentException implements ExceptionInterface {
    
    /**
     * @param string          $message      Exception message to throw
     * @param string[]        $alternatives List of similar defined names
     * @param int             $code         Exception code
     * @param \Throwable|null $previous     Previous exception used for the exception chaining
     */
    public function __construct(string $message, array $alternatives = [], int $code = 0, ?\Throwable $previous = null) {
        parent::__construct($message, $code, $previous);
    }
    
    /**
     * @return string[]
     */
    public function getAlternatives() : array {
        return $this->alternatives;
    }

}

Members

Title Sort descending Modifiers Object type Summary
CommandNotFoundException::getAlternatives public function
CommandNotFoundException::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal