[Next] [Previous] [Up] [Top] [Contents] [Index]

Recovering or aborting

Aborting

When the problem is obvious and is not inside a deeply nested time-consuming computation, it is often easiest to cancel out of the execution and start over.

When an error occurs in the middle of a long computation--for example, in the middle of a 3,000 file compilation--you will probably want to find a way to recover and continue the computation rather than aborting and starting over.

Options for recovery may include skipping some part of the computation (for example, not compiling one of the 3,000 files), or they may include changing your Lisp environment in some way so that the function which hit the error can be reinvoked successfully.

The simple error above can be handled by defining the function close-window and retrying the computation:

The Restarts window automatically gathers all possible ways of recovering from an error. It always offers you the option of canceling and sometimes offers other options for continuing. If there are multiple nested break loops, Restarts gives you the option of returning to any of them.

In some cases, such as the one shown above, Restarts offers more specific suggestions. Here the option "Apply specified function to (#<WINDOW "Untitled" #x4D4D99>)..." lets you call another function, rather than window-close.

Figure 4-4 The restarts window

Since the Restarts window is generated by a fixed algorithm, it often suggests the same restart multiple times. In such cases, it doesn't matter which copy you choose. (However, if there are multiple levels of break loop, make sure you're not choosing to return to a point in the wrong one!)


Gettmg Started with MCL - 19 OCT 1996
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker