next up previous
Next: 1.13.1 A Motivating Example Up: 1. From Scheme to Previous: 1.12.4 Polymorphic Visitors with

1.13 Unusual Situations versus Runtime Errors

In this section, we study Java exceptions, a language construct to process unusual situations and run-time errors. In the process, we will identify the limitations of checked exceptions.

Many production programs have to detect erroneous input, report it to the user, and in some cases recover to handle more input. Since handling erroneous input deviates from the expected flow of program control, Java provides a mechanism called exception handling that is tailored for this purpose. To be more specific, let us consider an example based on the arithmetic expression evaluator from the previous section.



 

Corky Cartwright
2000-01-07