]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: debug: add an optional message argument to the BUG_ON() family
authorWilly Tarreau <w@1wt.eu>
Mon, 5 Feb 2024 15:20:13 +0000 (16:20 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 5 Feb 2024 16:09:00 +0000 (17:09 +0100)
commit25968c186a79c16b07daf591cc4998dd54e9c065
tree8477f809788aa91251d4b71f7fc3e33b38a13cd3
parentd417863828a4704fc63023e53d6c74545fbf5d1b
MINOR: debug: add an optional message argument to the BUG_ON() family

This commit adds support for an optional second argument to BUG_ON(),
WARN_ON(), CHECK_IF(), that can be a constant string. When such an
argument is given, it will be printed on a second line after the
existing first message that contains the condition.

This can be used to provide more human-readable explanations about
what happened, such as "too low on memory" or "memory corruption
detected" that may help a user resolve the incident by themselves.
include/haproxy/bug.h