I just finished submitting revisions on The Paper. Not, you understand, revisions in response to reviewers' comments--we haven't received those yet--but rather revisions made necessary by my discovery, well after submission, of a bug in the code. Fortunately it didn't substantially affect the main results or the conclusions, but it did require revising some of the numbers.
I've never had to do anything like this before, and sincerely hope I never do again. It was a stupid bug, the kind of mistake that anyone can make coding at 2:00 AM on too much caffeine and way too little sleep, and I should damn well have caught it before sending out a paper which will pretty much define my research career to date.
But I'm glad it's done. Because while everyone makes mistakes, and indeed those mistakes are part of the process of science, you have to be honest about them. If you're not honest, then what you're doing isn't science, it's something else (say, politics or religion). There is no capital-T Truth in science, but there is truth, and we must always tell that truth as best we can.