Found a severe error in a conference paper after presentation but before the proceedings I am a final year undergraduate student and had worked on a very fundamental project(there is no available literature on this field presently) during my sophomore year. The results obtained were quite interesting but there was no available literature to back up my results. My supervisor suggested me to submit it to a conference and get reviews on the work. 

I did the same and when I submitted the final paper, I got a strong accept with quite positive feedback. I presented the paper at the conference and was also appreciated by my conference chair who said that it was an interesting finding. However, while working on the journal version recently, I discovered a severe error in my paper which completely invalidated the claims I had made in my work. 

The conference was highly reputed and delegates from all over the world were present. I feel really ashamed of presenting the wrong work at such a big stage. I discussed this with my supervisor and he told me that we will decline for publication by stating the reason when they will send the copyright form for inclusion in the digital proceedings. This gave me a sense of relief.

However, I cannot stop thinking about having presented the wrong work and seems like I should not have gone for it in the first place. Please suggest me what should I do. I have a deep interest in research but I am in constant fear that my habit of premature celebration will land me into trouble someday.
Let's see:


You wrote a paper of sufficient writing quality that it was chosen for presentation at a conference and publication.
None of the peer reviewers noticed anything wrong with it.
None of the people in the audience questioned it.
Your supervisor saw nothing wrong with it.
You gave an excellent presentation.
You found a flaw in a paper that had already been accepted for publication.
You had the integrity to withdraw your paper from publication.


That's a long list of things to put on your "plus" list.
Most undergrads don't achieve even one of them.
None of them should be seen as a negative.



Be warned that you'll become more jaded as you progress.

I remember as a grad student being asked by my supervisor to review a paper that had been sent for him to review.  It was well written and obviously the result of a lot of hard work, but I found a fundamental oversight that would have allowed the entire problem to be reduced to something very trivial.

We told the publishers about this, and they wrote back requesting that we recommend it for publication anyway.  My supervisor said that the author could publish another paper later that would re-analyze the problem and present it differently.

That's one (of many) reasons I eventually didn't bother finishing my own PhD.