Common Lisp the Language, 2nd Edition


next up previous contents index
Next: Establishing Restarts Up: Program Interface to Previous: Defining Conditions


29.4.6. Creating Conditions

change_begin
The function make-condition is the basic means for creating condition objects.

[Function]
make-conditiontype&restslot-initializations

Constructs a condition object of the given type using slot-initializations as a specification of the initial value of the slots. The newly created condition is returned.

The slot-initializations are alternating keyword/value pairs. For example:

(make-condition 'peg/hole-mismatch 
                :peg-shape 'square :hole-shape 'round)
change_end

AI.Repository@cs.cmu.edu