summaryrefslogtreecommitdiff
path: root/Documentation/technical/api-error-handling.txt
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-04-13 11:08:20 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-13 14:56:58 -0700
commit4bf0c6f38f8a3dda532ab7e4b9b32d6c4bb925ec (patch)
tree094aee7442405207450a44423ef3b6db4c598571 /Documentation/technical/api-error-handling.txt
parentusage.c: don't copy/paste the same comment three times (diff)
downloadtgif-4bf0c6f38f8a3dda532ab7e4b9b32d6c4bb925ec.tar.xz
api docs: document BUG() in api-error-handling.txt
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. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/technical/api-error-handling.txt')
-rw-r--r--Documentation/technical/api-error-handling.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/technical/api-error-handling.txt b/Documentation/technical/api-error-handling.txt
index ceeedd485c..71486abb2f 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.
- `die` is for fatal application errors. It prints a message to
the user and exits with status 128.