added back pdo exception handling