Throw an exception instead of or die() if unable to connect to the database