guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging with PSD (trace)


From: Bill Schottstaedt
Subject: Re: Debugging with PSD (trace)
Date: Sun, 1 Jul 2001 05:17:02 -0700

I think I found the problem: I needed to wrap the start-stack business
in "with-traps".  The following code works:

(defmacro with-trace (body)
  `(let* ((stderr (current-error-port))
          (snd-err (make-soft-port
                    (vector
                     (lambda (c) (snd-print c))
                     (lambda (s) (snd-print s))
                     (lambda () #f)
                     #f
                     (lambda () #f))
                    "w")))
     (dynamic-wind
      (lambda ()
        (set-current-error-port snd-err))
      (lambda ()
        (with-traps
         (lambda ()
           (start-stack 'repl-stack ,body))))
      (lambda ()
        (set-current-error-port stderr)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]