Error::getMessage

(No version information available, might only be in Git)
Gets the error message
final public string Error::getMessage ( void )

Returns the error message.

Returns:

Returns the error message as a string.

Examples:
Error::getMessage() example
1
2
3
4
5
6
7
<?php
try {
    throw new Error("Some error message");
catch(Error $e) {
    echo $e->getMessage();
}
?>

The above example will output something similar to:

Some error message
See also:

Throwable::getMessage() -

doc_php
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.