guile-user
[Top][All Lists]
Advanced

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

Re: Error in error?


From: Maxime Devos
Subject: Re: Error in error?
Date: Fri, 19 Aug 2022 22:39:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0


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: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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