[Top][All Lists]

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

Re: No way out.

From: Marius Vollmer
Subject: Re: No way out.
Date: Wed, 07 Dec 2005 03:07:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Bruce Korb <address@hidden> writes:

> Anyway,  *real bugs* in Guile 1.7.2 are:
> 1.  When an error is thrown, "exit" should be called with
>     EXIT_FAILURE, not 0.

I agree.  In 1.7.2, Guile no longer exits the whole program when an
uncaught error happens; it only exits the current thread with
"pthread_exit (NULL)".  If the current thread is the one running
'main', the process exits with return code 0.  Is there a way to
return an exit code with pthread_exit?

> 2.  After these commands:
>     (use-modules (ice-9 stack-catch))
>     (debug-enable 'backtrace)
>     I should be getting stack traces on Scheme errors.  I'm not.
>     (And, yes, I invoke either ``(backtrace)'' or ``scm_backtrace()''
>     when a failure is detected.)

Only "(debug-enable 'backtrace)" should be necessary.

However, you only get backtraces when the error happens from with the
usual read-eval-print-loop.  For example, this file

    (debug-enable 'backtrace)

    (define (foo)
      (+ 2 'a))


gives no backtrace when executed with

    $ guile -l x.scm

but you get a backtrace with

    $ guile
    guile> (load "x.scm")

And yes, this can be considered a bug, too... :-)

>     I can get file and line information for 1.6.7 and earlier
>     *only*.  There seems to be no way to do it in 1.7.

I will come back to this.

GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405

reply via email to

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