renamed current-error-handler to error-handler
This commit is contained in:
Binary file not shown.
+4
-5
@@ -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 ()
|
||||
|
||||
+3
-3
@@ -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))))
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user