ValueError
extends RuntimeException
in package
FinalYes
Exception for an invalid argument value passed.
This exception should be used when the argument uses the correct type, but doesn't comply with predefined restrictions, like an empty string being passed, when only a non-empty string is accepted or a negative integer being passed when a positive integer is expected.
Tags
Table of Contents
Methods
- create() : ValueError
- Create a new ValueError exception with a standardized start of the text.
Methods
create()
Create a new ValueError exception with a standardized start of the text.
public
static create(int $position, string $name, string $message) : ValueError
Parameters
- $position : int
-
The argument position in the function signature. 1-based.
- $name : string
-
The argument name in the function signature.
- $message : string
-
Arbitrary message text.