Team LiB
Previous Section Next Section

Chapter 7: Error Handling

Overview

So far in this book I have stayed away from any involved error handling. This was mainly to get rid of any extraneous code that was not directly related to the task at hand. However, I cannot hold off any longer. I do not want you to think that you can just go out programming and hope for the best.

No matter how good a programmer you are, you will need to provide some means of handling errors that occur. Here are some main sources of errors:

As far as this book is concerned, error handling goes hand in hand with data validation. After all, if your data is always good, there is no need to validate and no need to throw errors.


Team LiB
Previous Section Next Section