Next: , Previous: Generating Operations on Conditions, Up: Condition Instances

16.5.2 Condition Abstraction

The condition data type is abstracted through a predicate condition? and a set of accessor procedures.

— procedure: condition? object

Returns #f if and only if object is not a condition.

— procedure: condition/type condition

Returns the condition type of which condition is an instance.

— procedure: condition/error? condition

Returns #t if the condition is an instance of condition type condition-type:error or a specialization of it, #f otherwise.

— procedure: condition/restarts condition

Returns the list of restarts specified when condition was created.

— procedure: condition/continuation condition

Returns the continuation specified when condition was created. This is provided for inspecting the state of the system when the condition occurred, not for continuing or restarting the computation.

— procedure: write-condition-report condition port

Writes a description of condition to port, using the reporter function from the condition type associated with condition. See also condition/report-string.