try
{
functionnotexists();
}
catch (Throwable $e)
{
/* Print error message. */
pprint_r($e->getMessage());
}
(PHP 7, PHP 8)
Throwable::getMessage — Gets the message
Returns the message associated with the thrown object.
This function has no parameters.
Returns the message associated with the thrown object.
try
{
functionnotexists();
}
catch (Throwable $e)
{
/* Print error message. */
pprint_r($e->getMessage());
}