[plt-scheme] exn:break-continuation
I am having trouble using the continuation in a exn:break struct. I
have a program which I think should catch the first exception,
continue and then exit on the second one. The problem is that upon
invoking the continuation, mzscheme says that I am trying to jump into
an escape continuation. It seems to me that the continuation in an
exn:break struct should not be an escape-continuation, otherwise what
is the point of having it?
#!/usr/bin/env mzscheme
#lang scheme
(define caught #f)
(printf "starting~n")
(define k
(with-handlers ((exn:break? (lambda (exn)
(if caught
(printf "exiting")
(begin
(set! caught #t)
(printf "break~n")
((exn:break-continuation exn)))))))
(let loop () (loop))))
-Eric