100 lines
5.7 KiB
HTML
100 lines
5.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>29.4.10. Restart Functions</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value=" Restart Functions">
|
|
<meta name="keywords" value="clm">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<b>Common Lisp the Language, 2nd Edition</b>
|
|
<BR> <HR><A NAME=tex2html5992 HREF="node345.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5990 HREF="node334.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5984 HREF="node343.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5994 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5995 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html5993 HREF="node345.html"> Debugging Utilities</A>
|
|
<B>Up:</B> <A NAME=tex2html5991 HREF="node334.html"> Program Interface to </A>
|
|
<B> Previous:</B> <A NAME=tex2html5985 HREF="node343.html"> Warnings</A>
|
|
<HR> <P>
|
|
<H2><A NAME=SECTION0033410000000000000000>29.4.10. Restart Functions</A></H2>
|
|
<P>
|
|
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
|
|
Common Lisp has the following restart functions built in.
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>abort &optional <i>condition</i></tt><P> This function transfers control to the restart named <tt>abort</tt>. If no such
|
|
restart exists, <tt>abort</tt> signals an error of type <tt>control-error</tt>.
|
|
<P>
|
|
If <i>condition</i> is <tt>nil</tt> or not supplied, all outstanding restarts
|
|
are considered.
|
|
If <i>condition</i> is not <tt>nil</tt>, only restarts associated
|
|
with that condition are considered.
|
|
<P>
|
|
The purpose of the <tt>abort</tt> restart is generally to allow control to return to the
|
|
innermost ``command level.''
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>continue &optional <i>condition</i></tt><P> This function transfers control to the restart named <tt>continue</tt>. If no such
|
|
restart exists, <tt>continue</tt> returns <tt>nil</tt>.
|
|
<P>
|
|
If <i>condition</i> is <tt>nil</tt> or not supplied, all outstanding restarts
|
|
are considered.
|
|
If <i>condition</i> is not <tt>nil</tt>, only restarts associated
|
|
with that condition are considered.
|
|
<P>
|
|
The <tt>continue</tt> restart is generally part of simple protocols where there is
|
|
a single ``obvious'' way to continue, as with <tt>break</tt> and <tt>cerror</tt>. Some
|
|
user-defined protocols may also wish to incorporate it for similar reasons.
|
|
In general, however, it is more reliable to design a special-purpose restart
|
|
with a name that better suits the particular application.
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>muffle-warning &optional <i>condition</i></tt><P> This function transfers control to the restart named <tt>muffle-warning</tt>.
|
|
If no such restart exists, <tt>muffle-warning</tt> signals an error of type
|
|
<tt>control-error</tt>.
|
|
<P>
|
|
If <i>condition</i> is <tt>nil</tt> or not supplied, all outstanding restarts
|
|
are considered.
|
|
If <i>condition</i> is not <tt>nil</tt>, only restarts associated
|
|
with that condition are considered.
|
|
<P>
|
|
<tt>warn</tt> sets up this restart so that handlers of <tt>warning</tt> conditions have
|
|
a way to tell <tt>warn</tt> that a <tt>warning</tt> has already been dealt with and
|
|
that no further action is warranted.
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>store-value <i>value</i> &optional <i>condition</i></tt><P> This function transfers control (and one value) to the restart named
|
|
<tt>store-value</tt>. If no such restart exists, <tt>store-value</tt> returns <tt>nil</tt>.
|
|
<P>
|
|
If <i>condition</i> is <tt>nil</tt> or not supplied, all outstanding restarts
|
|
are considered.
|
|
If <i>condition</i> is not <tt>nil</tt>, only restarts associated
|
|
with that condition are considered.
|
|
<P>
|
|
The <tt>store-value</tt> restart is generally used by handlers trying to recover
|
|
from errors of types such as <tt>cell-error</tt> or <tt>type-error</tt>, where the handler
|
|
may wish to supply a replacement datum to be stored permanently.
|
|
<P>
|
|
<BR><b>[Function]</b><BR>
|
|
<tt>use-value <i>value</i> &optional <i>condition</i></tt><P> This function transfers control (and one value) to the restart named
|
|
<tt>use-value</tt>. If no such restart exists, <tt>use-value</tt> returns <tt>nil</tt>.
|
|
<P>
|
|
If <i>condition</i> is <tt>nil</tt> or not supplied, all outstanding restarts
|
|
are considered.
|
|
If <i>condition</i> is not <tt>nil</tt>, only restarts associated
|
|
with that condition are considered.
|
|
<P>
|
|
The <tt>use-value</tt> restart is generally used by handlers trying to recover
|
|
from errors of types such as <tt>cell-error</tt>, where the handler may wish to
|
|
supply a replacement datum for one-time use.
|
|
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html5992 HREF="node345.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5990 HREF="node334.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5984 HREF="node343.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5994 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5995 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html5993 HREF="node345.html"> Debugging Utilities</A>
|
|
<B>Up:</B> <A NAME=tex2html5991 HREF="node334.html"> Program Interface to </A>
|
|
<B> Previous:</B> <A NAME=tex2html5985 HREF="node343.html"> Warnings</A>
|
|
<HR> <P>
|
|
<HR>
|
|
<P><ADDRESS>
|
|
AI.Repository@cs.cmu.edu
|
|
</ADDRESS>
|
|
</BODY>
|