[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] 4.2.7. Exception Handling
- To: scheme-reports <scheme-reports@x>
- Subject: [Scheme-reports] 4.2.7. Exception Handling
- From: Andy Wingo <wingo@x>
- Date: Wed, 18 May 2011 10:32:58 +0200
The docs for `guard' note that if no cond clause matches, that the
exception is re-raised:
"then `raise' is re-invoked on the raised object within the dynamic
extent of the original call to `raise' except that the current
exception handler is that of the `guard' expression."
But it also notes that the exception handler's continuation and dynamic
context are that of the guard expression.
What does it mean to specify that the object is re-raised from the
original `raise' dynamic context? AFAICS there is no way to know what
the dynamic context is at the time of `raise', as the dynamic state is
unwound before invoking the handler.
Here's a program:
(define p (make-parameter 0))
(guard (e ((p)))
(parameterize ((p (+ (p) 1)))
What should `(f)' evaluate to, 0 or 1?
Scheme-reports mailing list