Stuff Happens

When writing software, as you may have experienced already, errors can occur. As we gain experience, we will learn to anticipate what kinds of errors can occur during program execution. For example, when performing a division calculation num/den between two variables "num" and "den", it is possible for the variable den to contain a value of zero. If this happens, a "division by zero" error should be generated to avoid a catastrophic calculation. Exceptions are a way of catching and handling potential errors so that a program will not crash and stop executing in an abrupt, untimely fashion.

The video provided in this subsection is essential for new programmers because the types of errors that can occur must be identified, discussed, and understood. The discussion on handling errors will be used as a springboard for understanding the rest of this unit.

Last modified: Tuesday, November 17, 2020, 4:39 PM