[plt-scheme] which continuation marks when raising new exception?
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