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

From: David T. Pierson (dtp at mindstory.com)
Date: Sun Jan 28 15:34:56 EST 2007

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:


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

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:

   (lambda (e)
     (raise (make-exn:fail:high-level
             (string->immutable-string "blah")
             (THIS)))))) ; <-- should (THIS) be
                         ;     (current-continuation-marks)
                         ;     or (exn-continuation-marks e)?



Posted on the users mailing list.