1
0
Fork 0
cl-sites/novaspec.org/cl/f_make-condition.html
2025-02-05 18:52:26 +01:00

254 lines
No EOL
5.2 KiB
HTML

<!DOCTYPE HTML>
<HTML LANG="en-us"
><HEAD
><TITLE
>make-condition | Common Lisp Nova Spec</TITLE
><META CHARSET="US-ASCII"
><LINK REL="canonical" HREF="f_make-condition.html"
><LINK REL="next" HREF="t_restart.html" TYPE="text/html" TITLE="restart"
><LINK REL="prev" HREF="f_define-condition.html" TYPE="text/html" TITLE="define-condition"
><LINK REL="up" HREF="9_2_Conditions_Dictionary.html" TYPE="text/html" TITLE="9.2 Conditions Dictionary"
><LINK REL="start" HREF="index.html" TYPE="text/html" TITLE="Common Lisp Nova Spec"
><META NAME="VIEWPORT" CONTENT="width=device-width, initial-scale=1.0"
><LINK REL="STYLESHEET" HREF="dpans.css%3F3909942064.css"
><SCRIPT SRC="dpans.js%3F3909942064"
></SCRIPT
><SCRIPT SRC="apropos.js%3F3909942064"
></SCRIPT
></HEAD
><BODY
><DIV
><DIV CLASS="topnav"
><DIV CLASS="breadcrumb"
><SPAN CLASS="breadcrumb-item"
><A HREF="index.html"
>Common Lisp Nova Spec</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="9_Conditions.html"
>9. Conditions</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="9_2_Conditions_Dictionary.html"
>9.2 Conditions Dictionary</A
></SPAN
> <SPAN CLASS="breadcrumb-item"
>&#8594; <A HREF="f_make-condition.html"
>make-condition</A
></SPAN
></DIV
><DIV CLASS="apropos"
><DIV CLASS="apropos-io"
><A HREF="f_define-condition.html" CLASS="prev"
>&#8592;</A
><SPAN ID="apropos-label"
>Apropos </SPAN
><INPUT ID="apropos" AUTOFOCUS="AUTOFOCUS" PLACEHOLDER="Type here to search" ONINPUT="aproposInput(this);" ONKEYUP="aproposKeyup(event);" ONCHANGE="aproposChange(this);" ONFOCUS="aproposFocus(this);" ONFOCUSOUT="aproposFocusout(this);"
><A HREF="t_restart.html" CLASS="next"
>&#8594;</A
></DIV
><DIV ID="apropos-res"
></DIV
></DIV
></DIV
><DIV CLASS="matter"
><DIV CLASS="com"
><DIV CLASS="begincom"
><HR
><TABLE WIDTH="100%" CELLSPACING="0" CELLPADDING="0"
><TR
><TD ALIGN="LEFT" VALIGN="BASELINE" WIDTH="100%" CLASS="name"
><SPAN CLASS="idx" DATA-KIND="idxref" DATA-TERM="make-condition"
></SPAN
><B
>make-condition</B
></TD
><TD ALIGN="RIGHT" VALIGN="BASELINE" WIDTH="0" NOWRAP="NOWRAP" CLASS="ftype"
><I
>Function</I
></TD
></TR
></TABLE
><HR
></DIV
><UL CLASS="subtoc"
></UL
><DL
><DT
><B
>Syntax</B
></DT
><DD
><P CLASS="j"
><B
>make-condition</B
> <SPAN CLASS="cmssi"
>type</SPAN
> <SPAN CLASS="cmtt"
>&amp;rest</SPAN
> <SPAN CLASS="cmssi"
>slot-initializations</SPAN
> <SPAN CLASS="arrow"
>&#8594;</SPAN
> <SPAN CLASS="cmssi"
>condition</SPAN
></P
></DD
><DT
><B
>Arguments and Values</B
></DT
><DD
><P CLASS="j"
><VAR CLASS="param"
>type</VAR
> &#8212; a <A HREF="26_1_Glossary.html#type_specifier"
><EM CLASS="term"
>type specifier</EM
></A
> (for a <A HREF="26_1_Glossary.html#subtype"
><EM CLASS="term"
>subtype</EM
></A
> of <A HREF="t_condition.html" CLASS="typeref"
><B
>condition</B
></A
>). </P
><P CLASS="j"
><VAR CLASS="param"
>slot-initializations</VAR
> &#8212; an <A HREF="26_1_Glossary.html#initialization_argument_list"
><EM CLASS="term"
>initialization argument list</EM
></A
>. </P
><P CLASS="j"
><VAR CLASS="param"
>condition</VAR
> &#8212; a <A HREF="26_1_Glossary.html#condition"
><EM CLASS="term"
>condition</EM
></A
>.</P
></DD
><DT
><B
>Description</B
></DT
><DD
><P CLASS="j"
>Constructs and returns a <A HREF="26_1_Glossary.html#condition"
><EM CLASS="term"
>condition</EM
></A
> of type <VAR CLASS="param"
>type</VAR
> using <VAR CLASS="param"
>slot-initializations</VAR
> for the initial values of the slots. The newly created <A HREF="26_1_Glossary.html#condition"
><EM CLASS="term"
>condition</EM
></A
> is returned.</P
></DD
><DT
><B
>Examples</B
></DT
><DD
><PRE CLASS="screen"
> (defvar *oops-count* 0)
(setq a (make-condition 'simple-error
:format-control "This is your ~:R error."
:format-arguments (list (incf *oops-count*))))
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> #&lt;SIMPLE-ERROR 32245104&gt;
(format t "~&amp;~A~%" a)
<SPAN CLASS="cmr"
>&#8883;</SPAN
> This is your first error.
<SPAN CLASS="cmsy"
><SPAN CLASS="arrow"
>&#8594;</SPAN
></SPAN
> NIL
(error a)
<SPAN CLASS="cmr"
>&#8883;</SPAN
> Error: This is your first error.
<SPAN CLASS="cmr"
>&#8883;</SPAN
> To continue, type :CONTINUE followed by an option number:
<SPAN CLASS="cmr"
>&#8883;</SPAN
> 1: Return to Lisp Toplevel.
<SPAN CLASS="cmr"
>&#8883;</SPAN
> Debug&gt;</PRE
></DD
><DT
><B
>Affected By</B
></DT
><DD
><P CLASS="j"
>The set of defined <A HREF="26_1_Glossary.html#condition"
><EM CLASS="term"
>condition</EM
></A
> <A HREF="26_1_Glossary.html#type"
><EM CLASS="term"
>types</EM
></A
>.</P
></DD
><DT
><B
>See Also</B
></DT
><DD
><P CLASS="j"
><A HREF="f_define-condition.html" CLASS="macref"
><B
>define-condition</B
></A
>, <A HREF="9_1_Condition_System_Concepts.html#sec_9_1" CLASS="secref"
><SPAN CLASS="cmr"
>Section</SPAN
> <SPAN CLASS="cmr"
>9.1</SPAN
> <SPAN CLASS="cmr"
>(Condition</SPAN
> <SPAN CLASS="cmr"
>System</SPAN
> <SPAN CLASS="cmr"
>Concepts)</SPAN
></A
></P
></DD
></DL
></DIV
></DIV
><DIV CLASS="footer"
><DIV CLASS="btmnav"
><A HREF="f_define-condition.html" CLASS="prev"
>&#8592;</A
><A HREF="t_restart.html" CLASS="next"
>&#8594;</A
></DIV
><DIV CLASS="trail"
>Conversion to HTML copyright 2023 by Gilbert Baumann</DIV
></DIV
></DIV
><SCRIPT
>domReady();</SCRIPT
></BODY
></HTML
>