class InvalidOptionException extends ArgumentException

Invalid option exception.

Properties

protected string $name Argument name. from ArgumentException
protected string $suggestion Suggestion.

Methods

__construct(string $message, string $name, string $suggestion = null, int $code = 0, Throwable $previous = null)

Constructor.

string
getName()

Returns the name of the missing argument.

string|null
getSuggestion()

Returns a argument name suggestion.

Details

at line 35
__construct(string $message, string $name, string $suggestion = null, int $code = 0, Throwable $previous = null)

Constructor.

Parameters

string $message The Exception message to throw
string $name Argument name
string $suggestion Suggestion
int $code The Exception code
Throwable $previous The previous exception used for the exception chaining

in ArgumentException at line 46
string getName()

Returns the name of the missing argument.

Return Value

string

at line 47
string|null getSuggestion()

Returns a argument name suggestion.

Return Value

string|null