To fix a 'die' call, you simply don't use die. You use conditional checks to determine where you are. Thats a simple matter of check if its false or not.
Your error isn't the same. Your error specifies that you do not have the mysqli available at all. The only way you can capture that is to use either reflection or using function_exists before attempting to call it. Since its fatal, it will immediately terminate the script process at that point.
So when writing it, that would be (this is for when you have mysqli available):
if ($dbc = mysql_connect('...'))
// connection good
print('Connection failed, do whatever you want with the output here.');
Unfortunately for your error, you will need to enable your mysqli library before attempting to use it.
The correct way to actually check the result of the call though would be to check the mysqli_connect_error() function. I believe they've fixed the bug as well when using object oriented mysqli; when it was first released the $connect_error member property would be null.