guile-user
[Top][All Lists]
Advanced

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

displaying a backtrace in the shell


From: Erica L Cooper
Subject: displaying a backtrace in the shell
Date: Tue, 7 Aug 2007 12:21:30 -0400 (EDT)

hello,

I am trying to get a guile script that is executed on a port server to display a backtrace if there is an error. as of now I have:

(define (backtrace-test args)
    (catch
        'ignore
      (lambda ()
        (lazy-catch
         #t
         (lambda () (throw 'test-error))
         (lambda (key . args)
           (let ((stack (make-stack #t)))
             (throw 'ignore
               (with-output-to-string
                   (lambda ()
                     (display-backtrace stack (current-output-port)))))))))
      (lambda (k . v)
        (display (car v)))))

which, if you run in interactive Guile, displays the backtrace without complaint. however, when you execute this from the command line, it says,

Exception during displaying of backtrace: wrong-type-arg

why is this?  any help is greatly appreciated.

Thanks,
Erica




reply via email to

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