Added a try-catch block to prevent pdo from printing database settings during a connection error.