Appendix C. Error Handling and Prevention
IN THIS APPENDIX
Errors occur when unexpected things happen in an application. They are often the result of bugs that have been introduced to a system, but can also be the result of bizarre user data, system misconfiguration, or a whole host of essentially unpredictable causes.
Writing robust error handling can exponentially increase the amount of code you need to write. In the real world, you have to strike a balance between too much and too little error handling. You will have to decide for yourself how much is enough for your applications. These are a few considerations I use to decide how much error checking ...