What is the most robust way to deal with errors or unexpected results in PHP? -
What is the most robust way to deal with errors or unexpected results in PHP? -
so when i've used
die($someerrormessage);
in php code until now, don't want stop entire script because 1 thing went wrong. if function can't finish page should still able load informing user something went wrong.
i thought returning null in grab block, wanted know if there standard method handling exception in php doesn't stop page generating, returns useful.
edited after re- reading question:
best way go using if statement check
if($error_exists) { // echo error or phone call error function } else { // echo clean stuff or phone call function }
that's way handle error's using if statement or if looking mysql_connect can utilize try/catch function
seek { // code } catch($error) // study error }
php error-handling
Comments
Post a Comment