diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-04-20 17:23:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-20 17:23:36 -0700 |
commit | fdef940afecbd15d3cbb626bd9be9cceaa0a8daf (patch) | |
tree | 091ad53d36dd7addbfaa3a4c1592902f2645c9cb /Documentation/technical | |
parent | Merge branch 'ab/detox-gettext-tests' (diff) | |
parent | api docs: document that BUG() emits a trace2 error event (diff) | |
download | tgif-fdef940afecbd15d3cbb626bd9be9cceaa0a8daf.tar.xz |
Merge branch 'ab/usage-error-docs'
Documentation updates, with unrelated comment updates, too.
* ab/usage-error-docs:
api docs: document that BUG() emits a trace2 error event
api docs: document BUG() in api-error-handling.txt
usage.c: don't copy/paste the same comment three times
Diffstat (limited to 'Documentation/technical')
-rw-r--r-- | Documentation/technical/api-error-handling.txt | 10 | ||||
-rw-r--r-- | Documentation/technical/api-trace2.txt | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/technical/api-error-handling.txt b/Documentation/technical/api-error-handling.txt index ceeedd485c..8be4f4d0d6 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. @@ -20,6 +23,9 @@ kinds. without running into too many problems. Like `error`, it returns -1 after reporting the situation to the caller. +These reports will be logged via the trace2 facility. See the "error" +event in link:api-trace2.txt[trace2 API]. + Customizable error handlers --------------------------- diff --git a/Documentation/technical/api-trace2.txt b/Documentation/technical/api-trace2.txt index c65ffafc48..3f52f981a2 100644 --- a/Documentation/technical/api-trace2.txt +++ b/Documentation/technical/api-trace2.txt @@ -465,7 +465,7 @@ completed.) ------------ `"error"`:: - This event is emitted when one of the `error()`, `die()`, + This event is emitted when one of the `BUG()`, `error()`, `die()`, `warning()`, or `usage()` functions are called. + ------------ |