unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: sidhu1f <sidhu1f@gmail.com>, Guile user <guile-user@gnu.org>
Subject: Re: Error in error?
Date: Fri, 19 Aug 2022 22:39:59 +0200	[thread overview]
Message-ID: <4d5e13c9-bca7-bbf6-8a39-58160096a895@telenet.be> (raw)
In-Reply-To: <CADhE+R8ZmxRfYRvk8FH1jT=XhDkLrat4okDdRvFgZ4RTWtTrMg@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 668 bytes --]


On 19-08-2022 01:44, sidhu1f wrote:
> According to the guile (version 3.0.7) reference manual, (error "foo
> ~a" 'bar) should output "foo bar" but instead the output is "foo ~a
> bar".  Am I missing something or is there a bug in error?

You might need 'scm-error' instead:

(scm-error 'misc-error 'the-procedure-name "foo ~a" '("args") '())

The documentation in the manual is a bit confusing -- as 'scm-error' is 
mentioned right after 'error', you might easily read "message 
constructed by displaying msg and writing arg" as "it displays and 
writes using 'format' on msg and the arg ...". Some room for improvement 
there.

Greetings,
Maxime


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  parent reply	other threads:[~2022-08-19 20:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 23:44 Error in error? sidhu1f
2022-08-19 14:16 ` Linus Björnstam
2022-08-19 20:39 ` Maxime Devos [this message]
2022-09-21 23:17   ` sidhu1f
2022-09-22 15:03     ` Maxime Devos

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=4d5e13c9-bca7-bbf6-8a39-58160096a895@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guile-user@gnu.org \
    --cc=sidhu1f@gmail.com \
    /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).