Suppressing PDO Warnings

I’m trying to display a server status, based upon whether the database can be connected to or not. With the old school mysql_connect() and mysqli_connect() it was easy. I’m trying to stay modern, so I’m using PDO, but I can’t figure out how-to suppress the default warning. From what I can tell, you need to use the getMessage() function for it to print the PDO warning, but I’m not using it.