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|null $suggestion = null, int $code = 0, Throwable|null $previous = null)

Constructor.

string
getName()

Returns the name of the missing argument.

string|null
getSuggestion()

Returns a argument name suggestion.

string
getMessageWithSuggestion()

Returns the exception message with a suggestion.

Details

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

Constructor.

Parameters

string $message The Exception message to throw
string $name Argument name
string|null $suggestion Suggestion
int $code The Exception code
Throwable|null $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

at line 57
string getMessageWithSuggestion()

Returns the exception message with a suggestion.

Return Value

string