emacs.d/clones/lisp/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node312.html

106 lines
7.2 KiB
HTML
Raw Normal View History

2022-08-26 19:11:35 +02:00
<!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. Conditions</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Conditions">
<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=tex2html5547 HREF="node313.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5545 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5539 HREF="node311.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5549 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5550 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html5548 HREF="node313.html"> Introduction</A>
<B>Up:</B> <A NAME=tex2html5546 HREF="clm.html">Common Lisp the Language</A>
<B> Previous:</B> <A NAME=tex2html5540 HREF="node311.html"> Functions in the </A>
<HR> <P>
<H1><A NAME=SECTION003300000000000000000>29. Conditions</A></H1>
By Kent M. Pitman
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
<A NAME=CONDITION><TT>PREFACE:</TT></A>
The language defined by the first edition contained an enormous lacuna:
although facilities were specified for signaling errors,
no means was defined for handling errors. This occurred not through neglect
of the issue, but because this part of the Lisp language generally
was in a state of flux. There were several proposals at the
time. The committee, finding that it could not agree on any one proposal,
agreed to disagree and omit error handling from Common Lisp for the time being.
This defect has now been addressed.
<P>
X3J13 voted in June 1988
(CONDITION-SYSTEM) <A NAME=36284>&#160;</A>
to adopt the Common Lisp Condition System
as a part of the forthcoming draft Common Lisp standard.
X3J13 voted in March 1989 (ZLOS-CONDITIONS) <A NAME=36285>&#160;</A>
to amend the specification of conditions to integrate them
with the Common Lisp Object System (see chapter <A HREF="node260.html#CLOS">28</A>).
X3J13 voted in June 1989 (CONDITION-RESTARTS) <A NAME=36287>&#160;</A> to amend the
specification of restarts in certain ways. These amendments have
been incorporated here with little further comment.
<P>
This chapter presents the bulk of the Common Lisp
Condition System proposal, written by Kent M. Pitman
and amended by X3J13. I have edited it only very lightly
to conform to the overall style of this book and have inserted a small
number of bracketed remarks identified by the initials GLS.
Please see the Acknowledgments to this second edition for the author's
acknowledgments to others who contributed to the Condition System proposal.
<P>
<blockquote>
-Guy L. Steele Jr.
</blockquote>
<img align=bottom alt="change_end" src="gif/change_end.gif">
<HR>
<UL>
<LI> <A NAME=tex2html5551 HREF="node313.html#SECTION003310000000000000000"> Introduction</A>
<LI> <A NAME=tex2html5552 HREF="node314.html#SECTION003320000000000000000"> Changes in Terminology</A>
<LI> <A NAME=tex2html5553 HREF="node315.html#SECTION003330000000000000000"> Survey of Concepts</A>
<UL>
<LI> <A NAME=tex2html5554 HREF="node316.html#SECTION003331000000000000000"> Signaling Errors</A>
<LI> <A NAME=tex2html5555 HREF="node317.html#SECTION003332000000000000000"> Trapping Errors</A>
<LI> <A NAME=tex2html5556 HREF="node318.html#SECTION003333000000000000000"> Handling Conditions</A>
<LI> <A NAME=tex2html5557 HREF="node319.html#SECTION003334000000000000000"> Object-Oriented Basis of Condition Handling</A>
<LI> <A NAME=tex2html5558 HREF="node320.html#SECTION003335000000000000000"> Restarts</A>
<LI> <A NAME=tex2html5559 HREF="node321.html#SECTION003336000000000000000"> Anonymous Restarts</A>
<LI> <A NAME=tex2html5560 HREF="node322.html#SECTION003337000000000000000"> Named Restarts</A>
<LI> <A NAME=tex2html5561 HREF="node323.html#SECTION003338000000000000000"> Restart Functions</A>
<LI> <A NAME=tex2html5562 HREF="node324.html#SECTION003339000000000000000"> Comparison of Restarts and Catch/Throw</A>
<LI> <A NAME=tex2html5563 HREF="node325.html#SECTION0033310000000000000000"> Generalized Restarts</A>
<LI> <A NAME=tex2html5564 HREF="node326.html#SECTION0033311000000000000000"> Interactive Condition Handling</A>
<LI> <A NAME=tex2html5565 HREF="node327.html#SECTION0033312000000000000000"> Serious Conditions</A>
<LI> <A NAME=tex2html5566 HREF="node328.html#SECTION0033313000000000000000"> Non-Serious Conditions</A>
<LI> <A NAME=tex2html5567 HREF="node329.html#SECTION0033314000000000000000"> Condition Types</A>
<LI> <A NAME=tex2html5568 HREF="node330.html#SECTION0033315000000000000000"> Signaling Conditions</A>
<LI> <A NAME=tex2html5569 HREF="node331.html#SECTION0033316000000000000000"> Resignaling Conditions</A>
<LI> <A NAME=tex2html5570 HREF="node332.html#SECTION0033317000000000000000"> Condition Handlers</A>
<LI> <A NAME=tex2html5571 HREF="node333.html#SECTION0033318000000000000000"> Printing Conditions</A>
</UL>
<LI> <A NAME=tex2html5572 HREF="node334.html#SECTION003340000000000000000"> Program Interface to the Condition System</A>
<UL>
<LI> <A NAME=tex2html5573 HREF="node335.html#SECTION003341000000000000000"> Signaling Conditions</A>
<LI> <A NAME=tex2html5574 HREF="node336.html#SECTION003342000000000000000"> Assertions</A>
<LI> <A NAME=tex2html5575 HREF="node337.html#SECTION003343000000000000000"> Exhaustive Case Analysis</A>
<LI> <A NAME=tex2html5576 HREF="node338.html#SECTION003344000000000000000"> Handling Conditions</A>
<LI> <A NAME=tex2html5577 HREF="node339.html#SECTION003345000000000000000"> Defining Conditions</A>
<LI> <A NAME=tex2html5578 HREF="node340.html#SECTION003346000000000000000"> Creating Conditions</A>
<LI> <A NAME=tex2html5579 HREF="node341.html#SECTION003347000000000000000"> Establishing Restarts</A>
<LI> <A NAME=tex2html5580 HREF="node342.html#SECTION003348000000000000000"> Finding and Manipulating Restarts</A>
<LI> <A NAME=tex2html5581 HREF="node343.html#SECTION003349000000000000000"> Warnings</A>
<LI> <A NAME=tex2html5582 HREF="node344.html#SECTION0033410000000000000000"> Restart Functions</A>
<LI> <A NAME=tex2html5583 HREF="node345.html#SECTION0033411000000000000000"> Debugging Utilities</A>
</UL>
<LI> <A NAME=tex2html5584 HREF="node346.html#SECTION003350000000000000000"> Predefined Condition Types</A>
</UL>
<BR> <HR><A NAME=tex2html5547 HREF="node313.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5545 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5539 HREF="node311.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5549 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5550 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html5548 HREF="node313.html"> Introduction</A>
<B>Up:</B> <A NAME=tex2html5546 HREF="clm.html">Common Lisp the Language</A>
<B> Previous:</B> <A NAME=tex2html5540 HREF="node311.html"> Functions in the </A>
<HR> <P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>