samedi 15 février 2020

Try catch not working in Laravel 5.6 when a number is divided by zero [duplicate]

Try catch block can not prevent run time exception in my Laravel code. I wrote following code to test the exception handling:

try{
    $a=112/0;
}catch(Exception $e){
    $a=99;
}

But it returns a Run time error. Please help me to solve the issue. Run time exception



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37rxVZ1
via IFTTT

Aucun commentaire:

Enregistrer un commentaire