You might want to consider generating a 500 Internal Server Error and show the user a generic error message, below is what I use to generate one if the database server doesn’t want to connect (used in conjunction with a try-catch block)
header('HTTP/1.1 500 Internal Server Error');
echo '
<h1>AWOL Database</h1>
<p>Our appologies, the site\'s database appears to have gone AWOL!</p>
<p>A search party has been dispatched to locate it and drag it back!</p>
';
// also notify server operator, maybe?
exit();