Skip to content

Commit f6d25d7

Browse files
avargitster
authored andcommitted
api docs: document that BUG() emits a trace2 error event
Correct documentation added in e544221 (trace2: Documentation/technical/api-trace2.txt, 2019-02-22) to state that calling BUG() also emits an "error" event. See ee4512e (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 0a9dde4 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4bf0c6f commit f6d25d7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Documentation/technical/api-error-handling.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ various kinds.
2323
without running into too many problems. Like `error`, it
2424
returns -1 after reporting the situation to the caller.
2525

26+
These reports will be logged via the trace2 facility. See the "error"
27+
event in link:api-trace2.txt[trace2 API].
28+
2629
Customizable error handlers
2730
---------------------------
2831

Documentation/technical/api-trace2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ completed.)
465465
------------
466466

467467
`"error"`::
468-
This event is emitted when one of the `error()`, `die()`,
468+
This event is emitted when one of the `BUG()`, `error()`, `die()`,
469469
`warning()`, or `usage()` functions are called.
470470
+
471471
------------

0 commit comments

Comments
 (0)