PHP Velho Oeste 2024

Throwable::getMessage

(PHP 7, PHP 8)

Throwable::getMessage获取信息

说明

public Throwable::getMessage(): string

返回抛出对象所关联的描述信息。

参数

此函数没有参数。

返回值

返回抛出对象所关联的描述信息。

参见

add a note add a note

User Contributed Notes 1 note

up
-14
lavaniapankaj at gmail dot com
4 years ago
try
{
    functionnotexists();
}
catch (Throwable $e)
{
    /* Print error message. */
    pprint_r($e->getMessage());
}
To Top