Previous: , Up: iklib conditions   [Index]


6.12.20 Miscellaneous primitives

Function: compound-condition? obj

Return #t if obj is a compound condition object; otherwise return #f.

(compound-condition? (make-error))
⇒ #f

(compound-condition? (condition (make-error)
                                (make-warning)))
⇒ #t

(compound-condition? "ciao")
⇒ #f
Function: condition-and-rtd? obj rtd

Return #t if obj is either a simple condition object of type rtd or a compound condition object containing a simple condition object of type rtd; otherwise return #f. rtd must be the record–type descriptor of a condition object type.

(condition-and-rtd? (make-error)
                    (record-type-descriptor &error))
⇒ #t

(condition-and-rtd? (condition (make-error)
                               (make-warning))
                    (record-type-descriptor &error))
⇒ #t

(condition-and-rtd? "ciao"
                    (record-type-descriptor &error))
⇒ #f
Function: print-condition cnd
Function: print-condition cnd port

Print a human readable serialisation of a condition object to the given port, which must be a textual output port. When not given: port defaults to the return value of (console-error-port).