You don't die every time you make a mistake, right? Why do you need your application?
the correct way is to catch errors and process them depending on the context, for example
try { application goes here $conn = mysql_connect(...) if(!$conn) throw .... .... } catch(Exception $err) { if(PRODUCTION) { log error say something nice } if(DEBUG) { var_dump($err); } }
user187291
source share