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