From: Fabrizio Bianchi <fabriziobianchi51@gmail.com>
To: guile-user@gnu.org
Subject: Re: How to get better stack trace from a script executed via shebang?
Date: Thu, 2 Feb 2023 17:46:07 +0100 [thread overview]
Message-ID: <CACSwkZEKY3cQ+7ORXpf6qS_NUUN-Ddtu+XMEhMwwevjBed1rFw@mail.gmail.com> (raw)
In-Reply-To: <CACSwkZG6DA8jn4BTFcGAVsrs1kbJw_gX3ZhY=TQety9a3WvN7Q@mail.gmail.com>
$ sudo apt-get install guile-3.0
bianchi fabrizio
Il giorno gio 2 feb 2023 alle ore 17:35 Fabrizio Bianchi <
fabriziobianchi51@gmail.com> ha scritto:
> salve. Ho letto il vostro messaggio.
> Purtroppo non capisco quale sia il problema.
> Provi a sentire la community. Ho installato dal sito FSF.org il guile 3.0.9
> bianchi fabrizio
>
>
> Il giorno gio 2 feb 2023 alle ore 17:13 Wolf <wolf@wolfsden.cz> ha
> scritto:
>
>> Hello,
>>
>> I'm having a problem of getting borderline useless stack traces from a
>> script
>> executed via a shebang. For example, let's consider following script:
>>
>> $ cat /tmp/x.scm
>> #!/bin/sh
>> exec guile --no-auto-compile -e main -s "$0" "$@"
>> !#
>>
>> (define (main args)
>> (foo))
>>
>> (define (foo)
>> (bar))
>>
>> (define (bar)
>> (error "x"))
>>
>> When I execute it directly, the error message is not great:
>>
>> $ /tmp/x.scm
>> Backtrace:
>> In ice-9/boot-9.scm:
>> 1752:10 4 (with-exception-handler _ _ #:unwind? _
>> #:unwind-for-type _)
>> In unknown file:
>> 3 (apply-smob/0 #<thunk 7fdb1e7a2340>)
>> In ice-9/boot-9.scm:
>> 724:2 2 (call-with-prompt ("prompt") #<procedure 7fdb1e7b2c80 at
>> ice-9/eval.scm:330:13 ()> #<procedure default-prompt-handler (k proc)>)
>> In ice-9/eval.scm:
>> 619:8 1 (_ #(#(#<directory (guile-user) 7fdb1e7a5c80>)))
>> In ice-9/boot-9.scm:
>> 2007:7 0 (error _ . _)
>>
>> ice-9/boot-9.scm:2007:7: In procedure error:
>> x
>>
>> The /tmp/x.scm file is not even mentioned once in the output. Can this be
>> somehow (command line arguments, changing the exec line, ...) improved?
>> Currently it's not very useful when I need to find out what the problem
>> was.
>>
>> Thank you,
>> W.
>>
>> --
>> There are only two hard things in Computer Science:
>> cache invalidation, naming things and off-by-one errors.
>>
>
next prev parent reply other threads:[~2023-02-02 16:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 16:11 How to get better stack trace from a script executed via shebang? Wolf
2023-02-02 16:35 ` Fabrizio Bianchi
2023-02-02 16:39 ` Fabrizio Bianchi
2023-02-02 16:46 ` Fabrizio Bianchi [this message]
2023-02-02 16:52 ` wolf
2023-02-02 16:39 ` Jean Abou Samra
2023-02-02 16:51 ` wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACSwkZEKY3cQ+7ORXpf6qS_NUUN-Ddtu+XMEhMwwevjBed1rFw@mail.gmail.com \
--to=fabriziobianchi51@gmail.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).