Error::__construct
PHP function
Edit on GitHub ✎
(PHP 7, PHP 8)
Construct the error object
Description
Error::__construct(string $message = "", int $code = 0, Throwable|null $previous = null)
Constructs the Error.
Parameters
messageThe error message.
codeThe error code.
previousThe previous throwable used for the exception chaining.
Notes
Note
The message is NOT binary safe.