add test for raise-continuable
This commit is contained in:
parent
5ffb4eb6c9
commit
947bed96ff
|
@ -1,4 +1,9 @@
|
|||
(write
|
||||
(define (print obj)
|
||||
(write obj)
|
||||
(newline)
|
||||
obj)
|
||||
|
||||
(print
|
||||
(call/cc
|
||||
(lambda (k)
|
||||
(with-exception-handler
|
||||
|
@ -9,3 +14,16 @@
|
|||
(k 'exception))
|
||||
(lambda ()
|
||||
(+ 1 (raise 'an-error)))))))
|
||||
|
||||
(print
|
||||
(with-exception-handler
|
||||
(lambda (con)
|
||||
(cond
|
||||
((string? con)
|
||||
(print con))
|
||||
(else
|
||||
(print "a warning has been issued")))
|
||||
42)
|
||||
(lambda ()
|
||||
(+ (raise-continuable "should be a number")
|
||||
23))))
|
||||
|
|
Loading…
Reference in New Issue