<sarcasm>
Well, it's difficult to say. I don't recall ever having made a mistake.
</sarcasm>
I'm reminded of the joke where a company's newly-hired young executive is at lunch with one of the company's older executives.
Young Exec: Sir, to what do you attribute your success?
Older Exec: Good decisions.
YE: And to what to you attribute your ability to make good decisions?
OE: Experience.
YE: And to what do you attribute your experience?
OE: Bad decisions.
In terms of practicality, I've long found that truthfully owning up to a mistake is the best policy. God help you if you've covered up a mistake and your boss digs up the truth.
The trick is in how you "own up". From my time in the military, I learned the difference between an excuse and an explanation. When a person gives an excuse, he or she is trying to shift the blame for hte mistake to someone else. When a person gives an explanation, he or she is simply describing how the bad decision that led to the mistake was reasonable one, given what he or she knew at the time.
But some mistakes are unexplainable. For example, when you simply forgot to test that function and that function is what makes the application barf. In those situations, it's best to just tell your boss, "Chief, I screwed up." and promise you'll not make that mistake again. And you've got to have the fortitude to take a butt-chewing (or worse) gracefully.
In terms of ethics, you have an ethical responsibility to produce the best product you can, whether that product is an operating system or a left-handed smoke shifter. If you do not admit mistakes quickly and fix them, then you have knowingly allowed a flaw in the product to continue to exist. And allowing a flaw to exist is not producing the best product you can.
Now, whether to report an error or not depends on circumstances. If I have a bug in a piece of code on a development server, I simply fix the bug. I'll only report it to anyone if I think that others could make good use of the experience of my mistake. For example, if you implemented a call to an API function according to the interpretation your project team has agreed is correct, but it turns out the team was wrong -- others, in this case, would benefit from your experience.
If the bug makes it into production, the responsibility to report mistakes is greater because others (beyond yourself and your development team) are affected by the bug.
Want the best answers? Ask the best questions: TANSTAAFL!!