Catch PDO exceptions