- instead of default-exception handler, new-cafe establishes a handler
that calls the current value of base-exception-handler so the handler can be overridden, as we do in our own make files. cafe.ss, 7.ms original commit: 99b763e30d22b205106ef9a84ea2e0a928fd0b30
This commit is contained in:
parent
ca1560f4d0
commit
7bc1af89c8
5
LOG
5
LOG
|
@ -291,3 +291,8 @@
|
||||||
not-like patterns.
|
not-like patterns.
|
||||||
cp0.ss,
|
cp0.ss,
|
||||||
cp0.ms, 4.ms
|
cp0.ms, 4.ms
|
||||||
|
- instead of default-exception handler, new-cafe establishes a handler
|
||||||
|
that calls the current value of base-exception-handler so the handler
|
||||||
|
can be overridden, as we do in our own make files.
|
||||||
|
cafe.ss,
|
||||||
|
7.ms
|
||||||
|
|
19
mats/7.ms
19
mats/7.ms
|
@ -3300,6 +3300,25 @@ evaluating module init
|
||||||
(new-cafe))
|
(new-cafe))
|
||||||
(get))))
|
(get))))
|
||||||
"Huh? \nException: invalid syntax (if)\nHuh? \n")
|
"Huh? \nException: invalid syntax (if)\nHuh? \n")
|
||||||
|
(equal?
|
||||||
|
(separate-eval
|
||||||
|
`(let ([ip (open-string-input-port "
|
||||||
|
(base-exception-handler
|
||||||
|
(lambda (c)
|
||||||
|
(fprintf (console-output-port) \"~%>>> \")
|
||||||
|
(display-condition c (console-output-port))
|
||||||
|
(fprintf (console-output-port) \" <<<~%\")
|
||||||
|
(reset)))
|
||||||
|
(if)")])
|
||||||
|
(let-values ([(op get) (open-string-output-port)])
|
||||||
|
(parameterize ([console-input-port ip]
|
||||||
|
[console-output-port op]
|
||||||
|
[console-error-port op]
|
||||||
|
[#%$cafe 0]
|
||||||
|
[waiter-prompt-string "Huh?"])
|
||||||
|
(new-cafe))
|
||||||
|
(get))))
|
||||||
|
"\"Huh? Huh? \\n>>> Exception: invalid syntax (if) <<<\\nHuh? \\n\"\n")
|
||||||
)
|
)
|
||||||
|
|
||||||
(mat reset
|
(mat reset
|
||||||
|
|
|
@ -209,7 +209,8 @@ Type e to exit interrupt handler and continue
|
||||||
(reset-handler (lambda () (k2)))
|
(reset-handler (lambda () (k2)))
|
||||||
(call/cc (lambda (k) (set! k2 k)))
|
(call/cc (lambda (k) (set! k2 k)))
|
||||||
(parameterize ([$cafe (+ ($cafe) 1)] [$interrupt reset])
|
(parameterize ([$cafe (+ ($cafe) 1)] [$interrupt reset])
|
||||||
(with-exception-handler default-exception-handler
|
(with-exception-handler
|
||||||
|
(lambda (c) ((base-exception-handler) c))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(waiter ($cafe) eval))))))))]))))
|
(waiter ($cafe) eval))))))))]))))
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user