# How to begin an error/die string? Upper- or lower-case letter?

2 messages from 2017-12-11 to 2017-12-11. Participants: Lars Schneider, Thomas Gummerer.
Thread: https://gitlist.dev/t/47424

## Lars Schneider, 2017-12-11 10:23

Subject: How to begin an error/die string? Upper- or lower-case letter?
Message-ID: <0ABBA110-59E9-423C-9A8E-9CF4BE2C4CA9@gmail.com>
URL: https://gitlist.dev/e/0ABBA110-59E9-423C-9A8E-9CF4BE2C4CA9%40gmail.com

```
Hi,

error() and die() messages seems to begin with upper-case and 
lower-case letters in the Git code base:

  git grep 'error(_' | perl -nE 'say /.*error\(_\("(.).*/' | sort | uniq -c
  git grep 'die(_' | perl -nE 'say /.*die\(_\("(.).*/' | sort | uniq -c

Do we prefer one way over the other?

Thanks,
Lars


```

## Thomas Gummerer, 2017-12-11 12:25

Subject: Re: How to begin an error/die string? Upper- or lower-case letter?
Message-ID: <CALgYhfN4NiQsaBZBU8jj4XBd48BjdWcEUqJCZH-rkHF-8QbdLQ@mail.gmail.com>
URL: https://gitlist.dev/e/CALgYhfN4NiQsaBZBU8jj4XBd48BjdWcEUqJCZH-rkHF-8QbdLQ%40mail.gmail.com
In-Reply-To: <0ABBA110-59E9-423C-9A8E-9CF4BE2C4CA9@gmail.com>

```
On Mon, Dec 11, 2017 at 10:23 AM, Lars Schneider
<larsxschneider@gmail.com> wrote:
> Hi,
>
> error() and die() messages seems to begin with upper-case and
> lower-case letters in the Git code base:
>
>   git grep 'error(_' | perl -nE 'say /.*error\(_\("(.).*/' | sort | uniq -c
>   git grep 'die(_' | perl -nE 'say /.*die\(_\("(.).*/' | sort | uniq -c
>
> Do we prefer one way over the other?

The coding guidelines mandate not capitalizing error messages:

    $ git grep -A6 "Error Messages" Documentation/CodingGuidelines
    Documentation/CodingGuidelines:Error Messages
    Documentation/CodingGuidelines-
    Documentation/CodingGuidelines- - Do not end error messages with a
full stop.
    Documentation/CodingGuidelines-
    Documentation/CodingGuidelines- - Do not capitalize ("unable to
open %s", not "Unable to open %s")
    Documentation/CodingGuidelines-
    Documentation/CodingGuidelines- - Say what the error is first
("cannot open %s", not "%s: cannot open")

I guess those that are capitalized are just leftovers from before
we had that guideline in place, or slipped through review.

> Thanks,
> Lars
>

```
