You should protect your code, and return a descriptive error back to the user. Don't underestimate the importance of your appearance and attitude during the interview. While your skills and experience may be the focus of the technical interview, looking bored or uninterested may do more to sabotage your chances than blowing an interview problem. In addition to these basic rules for the technical interview, there are some other things worth pointing out. This means that the interviewer may not be aware of your past work experience.
Interviewers are interested in hearing about successes as well as failures.
When these past experiences weren't successful, you should point out the lessons learned or wisdom gained as a result of these failures. Interviewers want to see that candidates who have had negative experiences are not going to repeat their mistakes. Having a mastery of these topics will likely give you all the necessary knowledge to tackle the problems you will encounter during the technical interview. Also, review the areas for which you're interviewing. If you're interviewing for a systems programming job, review the differences between threads and processes, OS scheduling algorithms, and memory allocation.