[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13409: [patch] make some error messages clearer
From: |
Jim Meyering |
Subject: |
bug#13409: [patch] make some error messages clearer |
Date: |
Fri, 11 Jan 2013 08:39:51 +0100 |
Paul Eggert wrote:
> On 01/10/13 13:40, Jim Meyering wrote:
>> - error (0, errno, _("reading %s"), quote (src_name));
>> + error (0, errno, _("failed to read %s"), quote (src_name));
>
> Yes, that's fine too. It also avoids the gerund.
>
> A terser possibility, which I've used elsewhere,
> is something like this:
>
> error (0, errno, _("%s: read failed"), quotearg_colon (src_name));
If all else were equal, I'd have a slight preference for your wording,
but while the diagnostic itself is 3 bytes shorter, the overall line
length is 14 bytes longer than the original:
1 error (0, errno, _("reading %s"), quote (src_name));
2 error (0, errno, _("failed to read %s"), quote (src_name));
3 error (0, errno, _("%s: read failed"), quotearg_colon (src_name));
and the new name, quotearg_colon may require inclusion of "quotearg.h".
The problem is that "standard" use of error is getting too long, and
a naive conversion would lead to split lines and a decrease in readability.
This makes me want a two-argument wrapper to be used like this:
wwarn (_("%s: read failed"), src_name);
That seems more readable, and would not induce any line splitting.
(we can't use "warn", so I made up "wwarn")
We'd also have to adjust the syntax-checking rules that examine
diagnostics in the string arguments of error calls.
bug#13409: [patch] make some error messages clearer, Benno Schulenberg, 2013/01/11
bug#13409: [patch] make some error messages clearer, Pádraig Brady, 2013/01/17
bug#13409: [patch] make some error messages clearer, Pádraig Brady, 2013/01/10