api docs: document BUG() in api-error-handling.txt

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

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2021-04-13 11:08:20 +02:00
committed by Junio C Hamano
parent c00c7382dd
commit 4bf0c6f38f

View File

@ -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.
- `die` is for fatal application errors. It prints a message to
the user and exits with status 128.