I hope you were able to contact him in time!!!! I'd say call right away and explain things!!!!
When I've done something stupid I immediately tell my husband what I've done, why I did it, what I was thinking and apologize. Even though I've been pretty good so far (1000x better than the other affair he had 12 years ago), I'm still reacting sometimes.
I do think it softens the blow when you warn them first.
By the way, thanks Number Person for the excellent post here! You've made a good point of how many of us are learning these things and should know better, but are still behaving in unhealthy ways. I'm guilty of this. I'm going to copy out your post and put it in my notes. Thanks again for the insight!
There is no arriving, ever. It is all a continual becoming.