Re: RFC: error codes on exit

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

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux