Common Lisp the Language, 2nd Edition
Next: Signaling Conditions
Up: Survey of Concepts
Previous: Non-Serious
Conditions
Some types of conditions are predefined by the system. All types of
conditions are subtypes of condition
. That is,
(typep
x
'condition)
is
true if and only if the value of x is a condition.
Implementations supporting multiple (or non-hierarchical) type inheritance are expressly permitted to exploit multiple inheritance in the tree of condition types as implementation-dependent extensions, as long as such extensions are compatible with the specifications in this chapter. [X3J13 voted in March 1989 (ZLOS-CONDITIONS) to integrate the Condition System and the Object System, so multiple inheritance is always available for condition types.-GLS]
In order to avoid problems in portable code that runs both in systems
with multiple type inheritance and in systems without it, programmers
are explicitly warned that while all correct Common Lisp implementations
will ensure that
(typep
c
'condition)
is
true for all conditions c (and all subtype relationships
indicated in this chapter will also be true), it should not be
assumed that two condition types specified to be subtypes of the same
third type are disjoint. (In some cases, disjoint subtypes are
identified explicitly, but such disjointness is not to be assumed by
default.) For example, it follows from the subtype descriptions
contained in this chapter that in all implementations
(typep
c
'control-error)
implies (typep
c
'error)
,
but note that
(typep
c
'control-error)
does not imply
(not (typep
c
'cell-error))
.
Next: Signaling Conditions
Up: Survey of Concepts
Previous: Non-Serious
Conditions
AI.Repository@cs.cmu.edu