82 lines
4.5 KiB
HTML
82 lines
4.5 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.9. Warnings</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<meta name="description" value=" Warnings">
|
||
|
<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=tex2html5980 HREF="node344.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5978 HREF="node334.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5972 HREF="node342.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5982 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5983 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html5981 HREF="node344.html"> Restart Functions</A>
|
||
|
<B>Up:</B> <A NAME=tex2html5979 HREF="node334.html"> Program Interface to </A>
|
||
|
<B> Previous:</B> <A NAME=tex2html5973 HREF="node342.html"> Finding and Manipulating </A>
|
||
|
<HR> <P>
|
||
|
<H2><A NAME=SECTION003349000000000000000>29.4.9. Warnings</A></H2>
|
||
|
<P>
|
||
|
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
|
||
|
<A NAME=WARNINGCONDITIONS>Warnings</A>
|
||
|
are a subclass of errors that are conventionally regarded as ``mild.''
|
||
|
<P>
|
||
|
<BR><b>[Function]</b><BR>
|
||
|
<tt>warn <i>datum</i> &rest <em>arguments</em></tt><P> [This supersedes the description of <tt>warn</tt>
|
||
|
given in section <A HREF="node220.html#ERRORSIGNALLINGFUNCTIONS">24.1</A>.-GLS]
|
||
|
<P>
|
||
|
Warns about a situation, by signaling a condition of type <tt>warning</tt>.
|
||
|
<P>
|
||
|
If <i>datum</i> is a condition, then that condition is used directly.
|
||
|
In this case, if the condition is not of type <tt>warning</tt> or arguments
|
||
|
is non-<tt>nil</tt>, an error of type <tt>type-error</tt> is signaled.
|
||
|
<P>
|
||
|
If <i>datum</i> is a condition type (a class or class name), then the condition used is effectively the result
|
||
|
of <tt>(apply #'make-condition <i>datum</i> <i>arguments</i>)</tt>. This result
|
||
|
must be of type <tt>warning</tt> or an error of type <tt>type-error</tt> is signaled.
|
||
|
<P>
|
||
|
If <i>datum</i> is a string, then the condition used is effectively the result of
|
||
|
<P><pre>
|
||
|
(make-condition 'simple-error
|
||
|
:format-string <i>datum</i>
|
||
|
:format-arguments <i>arguments</i>)
|
||
|
</pre><P>
|
||
|
<P>
|
||
|
The precise mechanism for warning is as follows.
|
||
|
<OL>
|
||
|
<P>
|
||
|
<LI> The warning condition is signaled.
|
||
|
<P>
|
||
|
While the <tt>warning</tt> condition is being signaled, the <tt>muffle-warning</tt>
|
||
|
restart is established for use by a handler to bypass further action
|
||
|
by <tt>warn</tt> (that is, to cause <tt>warn</tt> to immediately return <tt>nil</tt>).
|
||
|
<P>
|
||
|
As part of the signaling process, if
|
||
|
<tt>(typep <i>condition</i> *break-on-signals*)</tt>
|
||
|
is true, then a <tt>break</tt> will occur prior to beginning the signaling
|
||
|
process.
|
||
|
<P>
|
||
|
<LI> If no handlers for the warning condition are found, or if all such
|
||
|
handlers decline, then the condition will be reported to <tt>*error-output*</tt>
|
||
|
by the <tt>warn</tt> function (with possible implementation-specific extra
|
||
|
output such as motion to a fresh line before or after the display
|
||
|
of the warning, or supplying some introductory text mentioning
|
||
|
the name of the function that called <tt>warn</tt> or the fact that this
|
||
|
is a warning).
|
||
|
<P>
|
||
|
<LI> The value returned by <tt>warn</tt> (if it returns) is <tt>nil</tt>.
|
||
|
</OL>
|
||
|
<img align=bottom alt="change_end" src="gif/change_end.gif">
|
||
|
|
||
|
<P>
|
||
|
<BR> <HR><A NAME=tex2html5980 HREF="node344.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5978 HREF="node334.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5972 HREF="node342.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5982 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5983 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html5981 HREF="node344.html"> Restart Functions</A>
|
||
|
<B>Up:</B> <A NAME=tex2html5979 HREF="node334.html"> Program Interface to </A>
|
||
|
<B> Previous:</B> <A NAME=tex2html5973 HREF="node342.html"> Finding and Manipulating </A>
|
||
|
<HR> <P>
|
||
|
<HR>
|
||
|
<P><ADDRESS>
|
||
|
AI.Repository@cs.cmu.edu
|
||
|
</ADDRESS>
|
||
|
</BODY>
|