api docs: document that BUG() emits a trace2 error event
Correct documentation added in e544221d97a (trace2: Documentation/technical/api-trace2.txt, 2019-02-22) to state that calling BUG() also emits an "error" event. See ee4512ed481 (trace2: create new combined trace facility, 2019-02-22) for the initial implementation. The BUG() function did not emit an event then however, that was only changed later in 0a9dde4a04c (usage: trace2 BUG() invocations, 2021-02-05), that commit changed the code, but didn't update any of the docs. Let's also add a cross-reference from api-error-handling.txt. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Apr 13, 2021 at 11:08 UTC
f6d25d7878901f0ec9b7a9c07c584911fc0da2ff
2 files changed
+4
-1
Documentation/technical/api-error-handling.txt
+3
@@ -23,6 +23,9 @@ various kinds.
23
without running into too many problems. Like `error`, it
24
returns -1 after reporting the situation to the caller.
25
26
+These reports will be logged via the trace2 facility. See the "error"
27
+event in link:api-trace2.txt[trace2 API].
28
+
29
Customizable error handlers
30
---------------------------
31
Documentation/technical/api-trace2.txt
+1
-1
@@ -465,7 +465,7 @@ completed.)
465
------------
466
467
`"error"`::
468
- This event is emitted when one of the `error()`, `die()`,
468
+ This event is emitted when one of the `BUG()`, `error()`, `die()`,
469
`warning()`, or `usage()` functions are called.
470
+
471
------------