[Scheme-reports] 4.2.7. Exception Handling Andy Wingo (18 May 2011 08:35 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Alaric Snell-Pym (18 May 2011 10:19 UTC)
Re: [Scheme-reports] 4.2.7. Exception Handling Aaron W. Hsu (20 May 2011 03:32 UTC)

[Scheme-reports] 4.2.7. Exception Handling Andy Wingo 18 May 2011 08:32 UTC

Hi!

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))
   (define f
     (lambda ()
       (guard (e ((p)))
         (parameterize ((p (+ (p) 1)))
           (raise #t)))))

What should `(f)' evaluate to, 0 or 1?

Andy
--
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports