Cli/src/Exceptions/Command/MissingCommandException.php

23 lines
657 B
PHP
Raw Normal View History

2024-11-08 15:56:14 +01:00
<?php
namespace Nest\Cli\Exceptions\Command;
use Nest\Cli\Commands\CommandContext;
use Throwable;
/**
* Exception thrown when no command have been provided.
*/
class MissingCommandException extends CommandException
{
/**
* @param CommandContext $commandContext Command context.
* @param int $code [optional] The Exception code.
* @param null|Throwable $previous [optional] The previous throwable used for the exception chaining.
*/
public function __construct(CommandContext $commandContext, int $code = 0, ?Throwable $previous = null)
{
parent::__construct($commandContext, "Please provide a command to execute.", $code, $previous);
}
}