User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:make-condition [2019/07/14 17:00]
cl:functions:make-condition [2019/09/20 06:00] (current)
Line 1: Line 1:
 +====== Function MAKE-CONDITION ======
 +
 +====Syntax====
 +**make-condition** //type ''&​rest''​ slot-initializations//​ → //​condition//​
 +
 +====Arguments and Values====
 +//type// - a //​[[CL:​Glossary:​type specifier]]//​ (for a //​[[CL:​Glossary:​subtype]]//​ of **[[CL:​Types:​condition]]**).
 +//​slot-initializations//​ - an //​[[CL:​Glossary:​initialization argument list]]//.
 +//​condition//​ - a //​[[CL:​Glossary:​condition]]//​.
 +
 +====Description====
 +Constructs and returns a //​[[CL:​Glossary:​condition]]//​ of type //type// using //​slot-initializations//​ for the initial values of the slots. The newly created //​[[CL:​Glossary:​condition]]//​ is returned.
 +
 +====Examples====
 +<​blockquote>​
 +(defvar *oops-count* 0) <​r>​*OOPS-COUNT*</​r>​
 +
 +([[CL:​Macros:​defvar]] *a* 
 +  (make-condition '​simple-error ​
 +                  :​format-control "This is your ~:R error." ​
 +                  :​format-arguments (list (incf *oops-count*)))) <​r>​*A*</​r>​
 +
 +([[CL:​Functions:​format]] [[CL:​Constant Variables:​t]] "​~&​~A~%"​ *a*)
 +<​o>​This is your first error.</​o>​
 +<​r>​[[CL:​Constant Variables:​nil|NIL]]</​r>​
 +
 +([[CL:​Functions:​error]] *a*)
 +<​e>​Error:​ This is your first error.
 +To continue, type :CONTINUE followed by an option number:
 +1: Return to Lisp Toplevel.
 +Debug></​e>​
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +The set of defined //​[[CL:​Glossary:​condition]]//​ //​[[CL:​Glossary:​type|types]]//​.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See Also====
 +**[[CL:​Macros:​define-condition|Macro DEFINE-CONDITION]]**,​ {\secref\ConditionSystemConcepts}
 +
 +====Notes====
 +None.
 +
 +\issue{FORMAT-STRING-ARGUMENTS:​SPECIFY}