I am simply trying to put a arithmetic expression around try-catch block.
Here's what I tried:
try
{
$result = 4/0;
}
catch (Exception $e)
{
d($e->getMessage());
}
But instead of printing $e->getMessage(), it is displaying Internal Server Error Division By Zero which is similar if I don't use any try-catch.
What am I doing wrong?