git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff Hostetler <git@jeffhostetler.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org, Josh Steadmon <steadmon@google.com>,
	Jeff King <peff@peff.net>,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: RFC: error codes on exit
Date: Fri, 21 May 2021 01:33:55 +0000	[thread overview]
Message-ID: <YKcOA7iVstB7LtZH@camp.crustytoothpaste.net> (raw)
In-Reply-To: <795fd316-2bb5-e382-b104-85d1aaa09a1c@jeffhostetler.com>

[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]

On 2021-05-20 at 15:09:44, Jeff Hostetler wrote:
> For the error event that `error()` and `die()` and friends generate,
> I emit both the fully formatted error message and the format string.
> 
> The latter, if used as a dictionary key, would let you group like
> events from different processes without worrying about the filename
> or blob id or remote name or etc. in any one particular instance.
> 
> Would that be sufficient as an error classification and something
> that you can key off of in your post-processing ?

I don't think that's going to be sufficient.  Many calls to die()
contain a translated string.  I am a native Anglophone and work in a
company where English is the sole language of communication, but I have
my computer configured in French, and I have had it configured in
Spanish as well.

It's totally possible that one of my colleagues who has a non-English
native language might be using a different language as well, so it would
be difficult to reliably map the format string into a fixed error case
in a typical corporate setting, since many languages might be in use.

> Granted the same format message might be used in multiple places in
> the source, but I also provide the source filename and line number.

The source filename and line number would be more helpful, but
inconveniently, people frequently change the code of Git, so the line
numbers aren't always stable over time.  So I think an error code would
be helpful nevertheless.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2021-05-21  1:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 23:34 RFC: error codes on exit Jonathan Nieder
2021-05-20  0:40 ` Felipe Contreras
2021-05-21 16:53   ` Alex Henrie
2021-05-21 23:20     ` H. Peter Anvin
2021-05-22  4:06       ` Bagas Sanjaya
2021-05-22  8:49       ` Junio C Hamano
2021-05-22  9:08         ` H. Peter Anvin
2021-05-22 21:22         ` Felipe Contreras
2021-05-22 21:29           ` H. Peter Anvin
2021-05-22 21:53             ` Felipe Contreras
2021-05-22 23:02               ` H. Peter Anvin
2021-05-22  9:12     ` Philip Oakley
2021-05-22 21:19       ` Felipe Contreras
2021-05-25 17:24         ` Alex Henrie
2021-05-25 18:43           ` Felipe Contreras
2021-05-20  0:49 ` Junio C Hamano
2021-05-20  1:19   ` Felipe Contreras
2021-05-20  1:55   ` Jonathan Nieder
2021-05-20  2:28     ` Junio C Hamano
2021-05-20 13:28 ` Jeff King
2021-05-20 17:47   ` Jonathan Nieder
2021-05-21  9:43     ` Jeff King
2021-05-20 15:09 ` Jeff Hostetler
2021-05-21  1:33   ` brian m. carlson [this message]
2021-05-21  1:20 ` brian m. carlson
2021-05-26  8:21 ` Ævar Arnfjörð Bjarmason

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=YKcOA7iVstB7LtZH@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=jeffhost@microsoft.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=steadmon@google.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;
as well as URLs for NNTP newsgroup(s).