io-error and raise/strerr now include an &error condition.

This commit is contained in:
Abdulaziz Ghuloum 2008-06-06 08:10:17 -07:00
parent af5472bfb2
commit df4b31af1f
3 changed files with 24 additions and 19 deletions

View File

@ -1186,11 +1186,15 @@
(eof-object? (lookahead-u8 p)))]
[else (die 'port-eof? "not an input port" p)])))
;;; FIXME: these hard coded constants should go away
(define EAGAIN-error-code -6) ;;; from ikarus-errno.c
(define (io-error who id err . other-conditions)
(define io-error
(case-lambda
[(who id err base-condition)
(raise
(apply condition
(condition
base-condition
(make-who-condition who)
(make-message-condition (strerror err))
(case err
@ -1204,8 +1208,8 @@
[(-45) (make-i/o-file-does-not-exist-error id)]
[else (if id
(make-irritants-condition (list id))
(condition))])
other-conditions)))
(condition))])))]
[(who id err) (io-error who id err (make-error))]))
;(define block-size 4096)
;(define block-size (* 4 4096))

View File

@ -260,6 +260,7 @@
[(who errno-code filename)
(raise
(condition
(make-error)
(make-who-condition who)
(make-message-condition (strerror errno-code))
(if filename

View File

@ -1 +1 @@
1499
1500