During input validation you could generate customized messages so that anyone can see what was wrong. The exception handling has been discussed in detail into the recipe Handling exceptions and error messages in this chapter. There are functions such as warning(), stop(), tryCatch(), and so on which have been discussed with proper examples.