]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qapi: nail down convention that Errors sections are lists
authorJohn Snow <jsnow@redhat.com>
Wed, 26 Jun 2024 22:21:15 +0000 (18:21 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 6 Jul 2024 06:58:24 +0000 (08:58 +0200)
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>
docs/devel/qapi-code-gen.rst
qapi/transaction.json

index f453bd354657650a4ea57d861c2f9e0d5ce3a63c..cee43222f1980dd236f53681c2f865b476777694 100644 (file)
@@ -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.
 
index 5749c133d4abea2cb6dc1d03362753f35f82f0ca..07afc269d54fee1898cc68afe7d75a8805aa243c 100644 (file)
 #     additional detail.
 #
 # Errors:
-#     Any errors from commands in the transaction
+#     Any errors from commands in the transaction
 #
 # Note: The transaction aborts on the first failure.  Therefore, there
 #     will be information on only one failed operation returned in an