The pill while pregnant

How harmful to your baby is it if you get pregnant while on the pill and continue to take it until a positive test?