Re: [PATCH v2 2/3] api docs: document BUG() in api-error-handling.txt

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

 



On Tue, Apr 13, 2021 at 11:08:20AM +0200, Ævar Arnfjörð Bjarmason wrote:

> When the BUG() function was added in d8193743e08 (usage.c: add BUG()
> function, 2017-05-12) these docs added in 1f23cfe0ef5 (doc: document
> error handling functions and conventions, 2014-12-03) were not
> updated. Let's do that.

Wow, I had no idea this file even existed (most of the time I looked at
technical/api-* the contents were along the lines of "somebody should
write this").

IMHO this is more evidence that this stuff should just go into header
files, where people are more likely to see and update it.

> diff --git a/Documentation/technical/api-error-handling.txt b/Documentation/technical/api-error-handling.txt
> index ceeedd485c9..71486abb2f0 100644
> --- a/Documentation/technical/api-error-handling.txt
> +++ b/Documentation/technical/api-error-handling.txt
> @@ -1,8 +1,11 @@
>  Error reporting in git
>  ======================
>  
> -`die`, `usage`, `error`, and `warning` report errors of various
> -kinds.
> +`BUG`, `die`, `usage`, `error`, and `warning` report errors of
> +various kinds.
> +
> +- `BUG` is for failed internal assertions that should never happen,
> +  i.e. a bug in git itself.

Your change looks obviously correct, of course.

-Peff



[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