Catch PDO exception to hide connection details