| condition(3scm) | Scheme Programmer's Manual | condition(3scm) |
NAME
condition - compound conditions
LIBRARY
(import (rnrs)) ;R6RS (import (rnrs conditions)) ;R6RS
SYNOPSIS
(condition condition1 ...)
DESCRIPTION
Returns a condition object with the components of the conditions as its components, in the same order, i.e., with the components of condition1 appearing first in the same order as in condition1, then with the components of condition2, and so on.
Compound conditions act as if they were any of the included simple conditions with regard to predicates and accessors.
RETURN VALUES
Returns a single value; a condition. The returned condition is compound if the total number of components is zero or greater than one. Otherwise, it may be compound or simple.
EXAMPLES
(define con (condition (make-error) (make-message-condition "I am an error"))) (error? con) => #t (message-condition? con) => #t (condition-message con) => "I am an error"
APPLICATION USAGE
Compound conditions are used when describing multiple aspects of exceptional situations. They are passed to raise(3scm) and raise-continuable(3scm). They are normally caught with guard(3scm).
COMPATIBILITY
Compound conditions are unique to R6RS.
ERRORS
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
- The wrong number of arguments was passed or an argument was outside its domain.
SEE ALSO
simple-conditions(3scm)
STANDARDS
R6RS
HISTORY
This procedure was first introduced in R6RS as part of the new condition system.
AUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
| 2022-05-14 |