updated to include PDO error attributes.