[LISPWORKS][Common Lisp HyperSpec (TM)] [Previous][Up][Next]

9.1.1 Condition Types

The next figure lists the standardized condition types. Additional condition types can be defined by using define-condition.

arithmetic-error                  floating-point-overflow   simple-type-error   
cell-error                        floating-point-underflow  simple-warning      
condition                         package-error             storage-condition   
control-error                     parse-error               stream-error        
division-by-zero                  print-not-readable        style-warning       
end-of-file                       program-error             type-error          
error                             reader-error              unbound-slot        
file-error                        serious-condition         unbound-variable    
floating-point-inexact            simple-condition          undefined-function  
floating-point-invalid-operation  simple-error              warning             

Figure 9-1. Standardized Condition Types

All condition types are subtypes of type condition. That is,

 (typep c 'condition) =>  true
if and only if c is a condition.

Implementations must define all specified subtype relationships. Except where noted, all subtype relationships indicated in this document are not mutually exclusive. A condition inherits the structure of its supertypes.

The metaclass of the class condition is not specified. Names of condition types may be used to specify supertype relationships in define-condition, but the consequences are not specified if an attempt is made to use a condition type as a superclass in a defclass form.

The next figure shows operators that define condition types and creating conditions.

define-condition  make-condition    

Figure 9-2. Operators that define and create conditions.

The next figure shows operators that read the value of condition slots.

arithmetic-error-operands   simple-condition-format-arguments  
arithmetic-error-operation  simple-condition-format-control    
cell-error-name             stream-error-stream                
file-error-pathname         type-error-datum                   
package-error-package       type-error-expected-type           
print-not-readable-object   unbound-slot-instance              

Figure 9-3. Operators that read condition slots. Serious Conditions

The following X3J13 cleanup issues, not part of the specification, apply to this section:

[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996-2005, LispWorks Ltd. All rights reserved.