Don Norman has a wonderful rant on error messages, explaining how they're more indicative of design flaws than user errors. To sum it up: "Error messages punish people for not behaving like machines.... It's time to design and build machines that conform to our requirements." He suggests replacing error messages with "collaborative messages," which prioritize working with the human to find mutually understandable interaction, instead of simply nuking non-compliant inputs and starting over. It's worth a read, especially if you're designing these kinds of things!