aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2024-06-26 18:21:15 -0400
committerMarkus Armbruster <armbru@redhat.com>2024-07-06 08:58:24 +0200
commitb32a6b62a82a4c1a07535e86b784ceaaa948fd85 (patch)
tree8cf68f149844f9f7ca0461b2420f0fb67f0113f9 /docs
parent9f2b848857fc2bd7f36802524ef89d149c77092c (diff)
qapi: nail down convention that Errors sections are lists
By unstated convention, Errors sections are rST lists. Document the convention, and make the one exception conform. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240626222128.406106-10-jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/devel/qapi-code-gen.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index f453bd3546..cee43222f1 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -1011,6 +1011,13 @@ like this::
"Returns" and "Errors" sections are only valid for commands. They
document the success and the error response, respectively.
+"Errors" sections should be formatted as an rST list, each entry
+detailing a relevant error condition. For example::
+
+ # Errors:
+ # - If @device does not exist, DeviceNotFound
+ # - Any other error returns a GenericError.
+
A "Since: x.y.z" tagged section lists the release that introduced the
definition.