Julie has this winner.
Saint Thomas Aquinas … says if a Catholic comes to believe the Church is in error in some essential, officially defined doctrine, it is a mortal sin against conscience, a sin of hypocrisy, for him to remain in the Church and call himself a Catholic, but only a venial sin against knowledge for him to leave the Church in honest but partly culpable error.
Peter Kreeft
She also has her excellent and moving personal story at the same link.