Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: Andrew Cagney <ac131313@cygnus.com>,
	gdb@sources.redhat.com, Richard.Earnshaw@arm.com
Subject: Re: how to format an error?
Date: Mon, 14 Jan 2002 02:37:00 -0000	[thread overview]
Message-ID: <200201141037.KAA23594@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Mon, 14 Jan 2002 10:21:25 +0200." <Pine.SUN.3.91.1020114102101.14027J-100000@is>

> 
> On Sun, 13 Jan 2002, Andrew Cagney wrote:
> 
> > Given the attached, which is the correct way of formatting an error message:
> > 
> > 	This is an error message.
> > 	this is an error message.
> > 	This is an error message
> > 	this is an error message
> 
> I suggest the last variant.  It goes with the GNU coding standards
> except for the capitalization.  But capitalization is
> language-specific (e.g., in German, all nouns are capitalized), and it
> was recently discovered in Emacs development that a 100% adherence to
> the capitalization rule you cited produces wrong results in some
> cases.  Most of the messages don't need caps, so I think losing that
> is the best alternative which is simple enough to adher to.

Hmm, I'd go for the third.  If the message were to appear in a GUI box, it 
could well be a line of text on its own, such as

         ************* ERROR **************
         *                                *
         *    This is an error message    *
         *                                *
         **********************************

In such a context I think it would be very wrong to start this with a 
lower-case letter.

However, exceptions:

strings extracted from user code shouldn't have the case changed, so

print foo

error: Foo doesn't exist

would be wrong.  Though I think this should be "'foo' doesn't exist"

Given that, (and that a litteral will never appear in the first letter) 
can we safely assume that we can capitalize the first letter during 
printing?  If so, we could mandate that all messages in the source code 
should start with a lower case letter (except where other capitalization 
rules apply) and then have the UI output routine capitalize the first 
letter as appropriate for the output stream?

R.


  reply	other threads:[~2002-01-14 10:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-13 20:36 Andrew Cagney
2002-01-14  0:22 ` Eli Zaretskii
2002-01-14  2:37   ` Richard Earnshaw [this message]
2002-01-14  3:08     ` Eli Zaretskii
2002-02-02  8:09   ` Andrew Cagney
2002-02-02  9:27     ` Eli Zaretskii
2002-02-03 19:22       ` Andrew Cagney

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201141037.KAA23594@cam-mail2.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=ac131313@cygnus.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.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