Next: stdlib io port, Up: stdlib io [Index]
The procedures described in this chapter, when they detect an
exceptional situation that arises from an “I/O errors”, raise an
exception with condition type &i/o
.
The condition types and corresponding predicates and accessors are
exported by both the (rnrs io ports (6))
and (rnrs io simple (6))
libraries. They are also exported by the (rnrs files (6))
library.
This condition type could be defined by:
(define-condition-type &i/o &error make-i/o-error i/o-error?)
This is a supertype for a set of more specific I/O errors.
This condition type could be defined by:
(define-condition-type &i/o-read &i/o make-i/o-read-error i/o-read-error?)
This condition type describes read errors that occurred during an I/O operation.
This condition type could be defined by:
(define-condition-type &i/o-write &i/o make-i/o-write-error i/o-write-error?)
This condition type describes write errors that occurred during an I/O operation.
This condition type could be defined by:
(define-condition-type &i/o-invalid-position &i/o make-i/o-invalid-position-error i/o-invalid-position-error? (position i/o-error-position))
This condition type describes attempts to set the file position to an invalid position. position should be the file position that the program intended to set. This condition describes a range error, but not an assertion violation.
This condition type could be defined by:
(define-condition-type &i/o-filename &i/o make-i/o-filename-error i/o-filename-error? (filename i/o-error-filename))
This condition type describes an I/O error that occurred during an operation on a named file. filename should be the name of the file, a Scheme string object.
This condition type could be defined by:
(define-condition-type &i/o-file-protection &i/o-filename make-i/o-file-protection-error i/o-file-protection-error?)
A condition of this type specifies that an operation tried to operate on a named file with insufficient access rights.
This condition type could be defined by:
(define-condition-type &i/o-file-is-read-only &i/o-file-protection make-i/o-file-is-read-only-error i/o-file-is-read-only-error?)
A condition of this type specifies that an operation tried to operate on a named read–only file under the assumption that it is writeable.
This condition type could be defined by:
(define-condition-type &i/o-file-already-exists &i/o-filename make-i/o-file-already-exists-error i/o-file-already-exists-error?)
A condition of this type specifies that an operation tried to operate on an existing named file under the assumption that it did not exist.
This condition type could be defined by:
(define-condition-type &i/o-file-does-not-exist &i/o-filename make-i/o-file-does-not-exist-error i/o-file-does-not-exist-error?)
A condition of this type specifies that an operation tried to operate on an non–existent named file under the assumption that it existed.
This condition type could be defined by:
(define-condition-type &i/o-port &i/o make-i/o-port-error i/o-port-error? (port i/o-error-port))
This condition type specifies the port with which an I/O error is
associated. port should be the port. Conditions raised by
procedures accepting a port as an argument should include an
&i/o-port-error
condition.
Next: stdlib io port, Up: stdlib io [Index]