emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#70142: closed ([PATCH] Fix error messages containing format strings)


From: GNU bug Tracking System
Subject: bug#70142: closed ([PATCH] Fix error messages containing format strings)
Date: Mon, 06 May 2024 09:44:02 +0000

Your message dated Mon, 06 May 2024 11:42:34 +0200
with message-id <87v83rl1it.fsf@gnu.org>
and subject line Re: bug#70142: [PATCH] Fix error messages containing format 
strings
has caused the debbugs.gnu.org bug report #70142,
regarding [PATCH] Fix error messages containing format strings
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70142: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70142
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Fix error messages containing format strings Date: Tue, 2 Apr 2024 09:52:34 +0200 User-agent: Mozilla Thunderbird
Hi all,
I recently ran into the issue that some error messages in Guile are not
formatted properly.
As a simple reproducer, fire up a REPL and do

,option on-error 'foo

Which will yield

"While executing meta-command:
Bad on-error value ~a; expected one of ~a foo (debug backtrace report pass)"

The reason is that format strings occurring in the message are
escaped, see `module/ice-9/boot-9.scm`  and
`module/language/tree-il/primitives.scm`.

So a call of

`(error "Wrong argument: ~a" 42)`

is rendered as

"Wrong argument: ~a 42"
Some callers did not take this behavior into account.

Patch attached.

Michael

Attachment: 0001-Fix-error-messages-containing-format-strings.patch
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#70142: [PATCH] Fix error messages containing format strings Date: Mon, 06 May 2024 11:42:34 +0200 User-agent: Gnus/5.13 (Gnus v5.13)
Hi Michael,

Michael Käppler <xmichael-k@web.de> skribis:

> The reason is that format strings occurring in the message are
> escaped, see `module/ice-9/boot-9.scm`  and
> `module/language/tree-il/primitives.scm`.
>
> So a call of
>
> `(error "Wrong argument: ~a" 42)`
>
> is rendered as
>
> "Wrong argument: ~a 42"
> Some callers did not take this behavior into account.

Good catch, applied.  Thanks!

Ludo’.


--- End Message ---

reply via email to

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