catch the pdo exception