Thread (232 messages) flat view 232 messages, 10 authors, 2021-11-11
STALE1772d

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-03-28 02:27:32
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

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 <redacted>
---
 Documentation/technical/api-error-handling.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
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.
 
 - `die` is for fatal application errors.  It prints a message to
   the user and exits with status 128.
-- 
2.31.1.445.g91d8e479b0a
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help