ABSTRACT

Exceptions occur when a part of a program, such as a method, encounters a problem that it cannot handle correctly. These problems are not necessarily bugs; they could be such situations as a user entering invalid input that cannot be handled in the current method. Often the programmer has made allowances for these problems, but to keep the methods in the program as generic as possible, programs are designed so that these problems are handled outside of the method where they occur.