add test for raise-continuable

This commit is contained in:
Yuichi Nishiwaki 2013-11-17 17:43:03 +09:00
parent 5ffb4eb6c9
commit 947bed96ff
1 changed files with 19 additions and 1 deletions

View File

@ -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))))