Response to detected errors in well-structured programs

This paper discusses an approach to handling run time errors in wellstructured programs. It is often assumed that in well-structured programs which can be proven correct errors will not be a problem. This paper is predicated on the assumption that run time errors will continue to be a problem. This paper describes an organization for structured programs which attempts to satisfy the following criteria: (1) Error response routines are written by each programmer in terms of the abstract machine which he uses for his normal case code. Errors are reported in those terms. He is never forced to use information about the implementation of other levels in the system. (2) Programs can be written so that the code for error detection, error correction, and normal case, are lexically separate and can be modified independently. (3) The system can evolve from one which does little error recovery to one which introduces quite sophisticated techniques without a change in structure. (4) Even with unsophisticated recovery procedures, the task of locating the module containing a bug discovered at run time does not require knowledge of many modules.