nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] The function, void admonish (char *what, char *fmt, ..


From: norm
Subject: Re: [Nmh-workers] The function, void admonish (char *what, char *fmt, ...)
Date: Sat, 26 Jan 2013 08:38:21 -0800

David Levine <address@hidden> writes:
>Norm wrote:
>
>> It seems to me (it's been decades since I programmed in C) that
>> admonish does very little for programmers, except induce them to
>> issue frustratingly ambiguous (sometimes dangerously ambiguous)
>> error messages; that directly calling advertise would be very little
>> extra trouble and would avoid that inducement. I'm not suggesting a
>> wholesale elimination of all 89 present calls to admonish. I'm
>> merely suggesting that admonish be deprecated via an appropriate
>> comment, in error.c, just above admonish.
>
>admonish() tacks the "continuing..." string onto whatever it
>passes along to advertise().  That's all it does.
>
>Calling advertise() would be no extra trouble.  But I don't see
>your point.  Is "continuing..." not always appropriate?
>
>If there are dangerously ambigous warning messages, they'll have
>to be fixed one at a time.  Suggestions welcome :-)

Here is an example:

% folder +/tmp/inbox
/tmp/inbox+ has 20 messages  (1-75).
% sortm
sortm: can't parse date field in message 66, continuing...
sortm: can't parse date field in message 67, continuing...
sortm: can't parse date field in message 68, continuing...
sortm: can't parse date field in message 70, continuing...
sortm: can't parse date field in message 71, continuing...
sortm: can't parse date field in message 72, continuing...

So I know, that messages 66-72 had a missing or badly formatted date field and 
that sortm plowed on anyway. But what happened to these messages. I would have 
guessed that they would be left in place. But that's wrong. In this instance, 
at least, they wound up at the end of +/tmp/inbox. Did the programmer know 
that? I don't know. But whatever he did know should have been passed on to me.

One dodge which might sometimes be useful, would be to put the details in the 
man page and have the continuing... message cite the man page.

I grant that I see no "dangerous" ambiguity here, but it is certainly 
disconcerting.



reply via email to

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