chapter  Chapter 4
35 Pages

Throwing Custom Exceptions

WithJerome DiMarzio

In the previous three chapters we discussed and examined some of the habits that you can change to make your code either more bug resistant or more debugger-friendly. However, these skills and techniques will probably not help you find the bug in the first place. One of the keys in debugging is, as elementary as it sounds, finding the bugs. That is, we must realize that a bug exists before we can attempt to extract it from the code. Some bugs can be blatant, in that they will seize processing, freeze the operating system, or even crash the computer. Other bugs can by subtle and simply throw up a cryptic error code, many of which are overlooked if they do not appear to affect operation.