Let's begin this chapter by looking at two words: exception and handling. In English, the word exception refers to something unusual that doesn't usually happen. In programming, the word exception has a similar meaning, but is related to software code. By their nature, computer programs should do only those things that we instruct them to do, and it is considered abnormal when a computer won't or can't follow our instructions. If the computer program fails to follow our instructions, it is classified as an exception in the software world.
Error is another word that is heavily used in programming. It is important for us to understand that an error and an exception are not the same thing. An error refers to an incident where the software couldn't even run. More specifically, an error means that the code that is written contains something...