OtherToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.0
Unrevised from 7.0 to 8.0.

with-auto-zoom-and-exit

It is often desirable, when an error occurs while running a batch process (that is, running a program while no operator is monitoring progress) to simply produce a backtrace (as if with the :zoom top-level command) and perhaps write out other useful information, and then exit. Then, when an operator next looks at things, useful information about the failure will be available but the running but now broken process will not be consuming resources.

For a variety of reasons, however, producing a backtrace programmatically is rather complicated. So, to allow users to do so, we have provided a macro with-auto-zoom-and-exit, defined in the file [Allegro directory]/src/autozoom.cl (and not part of the standard Lisp image). One this page, we describe the macro.

It takes the following arguments:

Arguments: (place &key (exit t) (no-unwind t) &body body

place is typically either a filename or a stream. :zoom output is written there. If place is a filename, the file is opened and closed by this macro (using with-open-file). If place is a stream, it is not closed.

If exit is non-nil, then Lisp exits (by calling exit) after the output is written. In the call to exit, the no-unwind keyword argument to exit is given the value of no-unwind. (It is typical to call exit with :no-unwind t in an error situation because that guarantees that Lisp will exit.) It is not necessary to exit. You might want to, for example, clear the error and restart computation on the same or a different problem. If the application provides a continuous service, the service can be retsrated after the exit is cleared.

This macro is usually wrapped around the call to the application being run. That call is typically in the body.

See Getting a backtrace programmatically in debugging.htm.


Copyright (c) 1998-2008, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.0. This page was not revised from the 7.0 page.
Created 2005.12.9.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.0
Unrevised from 7.0 to 8.0.