[plt-scheme] which continuation marks when raising new exception?

From: Robby Findler (robby.findler at gmail.com)
Date: Sun Jan 28 18:32:30 EST 2007

I believe the answer is "it depends". Do you want the stacktrace from
the first place or the second place? If the first, use
(exn-continuation-marks e) and if the second place, use


On 1/28/07, David T. Pierson <dtp at mindstory.com> wrote:
> Hi all,
> When raising an exception in response to a lower-level exception (both
> of which are of type exn?), should I call (current-continuation-marks)
> or use the exn-continuation-marks from the lower-level exception?
> I see that the latter is done in at least a couple of places in the
> collections source:
> collects/web-server/dispatchers/dispatch-servlets.ss
> collects/make/make-unit.ss
> But since I am only partially aware of the purpose of continuation
> marks, I'm not sure if those are special cases or represent the standard
> case.
> I will add the answer to the cookbook if no one beats me to it.
> Here's code in case it isn't clear in what context I am asking this:
> (with-handlers
>  ((exn:fail?
>    (lambda (e)
>      (raise (make-exn:fail:high-level
>              (string->immutable-string "blah")
>              (THIS)))))) ; <-- should (THIS) be
>                          ;     (current-continuation-marks)
>                          ;     or (exn-continuation-marks e)?
>   ...)
> Thanks.
> David
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.