changed the checkpoint computation to avoid interfereing with other parameters

svn: r14913
This commit is contained in:
Robby Findler 2009-05-21 23:17:45 +00:00
parent 2f6b572178
commit 5be3d8d2f7

View File

@ -46,12 +46,12 @@ TODO
(define checkpoints (make-weak-hasheq))
(define (call-with-stack-checkpoint thunk)
(define checkpoint (current-continuation-marks))
(with-handlers ([exn? (lambda (exn)
;; nested ones take precedence
(unless (hash-has-key? checkpoints exn)
(hash-set! checkpoints exn checkpoint))
(raise exn))])
(thunk)))
(call-with-exception-handler
(λ (exn)
(unless (hash-has-key? checkpoints exn)
(hash-set! checkpoints exn checkpoint))
exn)
thunk))
;; returns the stack of the input exception, cutting off any tail that was
;; registered as a checkpoint
(define (cut-stack-at-checkpoint exn)