renamed current-error-handler to error-handler

This commit is contained in:
Abdulaziz Ghuloum 2006-12-02 06:26:05 -05:00
parent cd8fea1a05
commit fa1141b57d
4 changed files with 8 additions and 9 deletions

Binary file not shown.

View File

@ -1,17 +1,17 @@
(let ()
(define with-error-handler
(lambda (p thunk)
(let ([old-error-handler (current-error-handler)])
(let ([old-error-handler (error-handler)])
(dynamic-wind
(lambda ()
(current-error-handler
(error-handler
(lambda args
(current-error-handler old-error-handler)
(error-handler old-error-handler)
(apply p args)
(apply error args))))
thunk
(lambda ()
(current-error-handler old-error-handler))))))
(error-handler old-error-handler))))))
(define eval-depth 0)
@ -30,7 +30,6 @@
(with-error-handler
(lambda args
(reset-input-port! (console-input-port))
;(display "repl catch\n" (console-output-port))
(apply print-error args)
(k (void)))
(lambda ()

View File

@ -483,7 +483,7 @@
(error 'display "~s is not an output port" p))
(display x p)]))
(primitive-set! 'print-error print-error)
(primitive-set! 'current-error-handler
(primitive-set! 'error-handler
(make-parameter
(lambda args
(apply print-error args)
@ -492,8 +492,8 @@
(lambda (x)
(if (procedure? x)
x
(error 'current-error-handler "~s is not a procedure" x)))))
(error 'error-handler "~s is not a procedure" x)))))
(primitive-set! 'error
(lambda args
(apply (current-error-handler) args))))
(apply (error-handler) args))))

View File

@ -69,7 +69,7 @@
display write print-graph fasl-write printf format print-error
read-token read
error exit call/cc
current-error-handler
error-handler
eval current-eval interpret compile compile-file new-cafe load
system
expand sc-expand current-expand expand-mode