I cannot make try work. I tried this:
try {
    echo 1/0;
    } catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
    }
Which results on the error:
Warning: Division by zero in /var/www/vhosts/saliganando.com/webs/momemi/apis/interpret-bot.php on line 6 
I tried modifying error_reporting() and ini_set() but I have only managed to either remove the warning or display it, but 'Caught exception...' is never shown.
What am I doing wrong?
 
    