Skip to contentSkip to conversation

qapi: Remove some error documentation lint

PATCH In review Markus Armbruster 2 participants 6 messages Sep 11, 2024 – Sep 13, 2024

lore
Share & tools
lore
#0 lore raw

cover qapi: Remove some error documentation lint

Markus Armbruster (2):
qapi: Drop "with an explanation" from error descriptions qapi/block-core: Drop drive-backup's "Any other error" documentation

 qapi/block-core.json | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
Signature · 1 line
2.46.0
#1 lore raw

PATCH 1/2 qapi: Drop "with an explanation" from error descriptions

All errors come with an explanation, namely the human-readable error message in the error response's @desc member. Drop the redundant "with an explanation" phrase.

---
 qapi/block-core.json | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
qapi/block-core.json +5 -6
index 9f6dd59298..82f59a7758 100644
@@ -2299,7 +2299,7 @@
 #
 # Errors:
 #     - If @node is not a valid block device or node, DeviceNotFound
-#     - If @name is already taken, GenericError with an explanation
+#     - If @name is already taken, GenericError
 #
 # Since: 2.4
 #
@@ -2322,7 +2322,7 @@
 #
 # Errors:
 #     - If @node is not a valid block device or node, DeviceNotFound
-#     - If @name is not found, GenericError with an explanation
+#     - If @name is not found, GenericError
 #     - if @name is frozen by an operation, GenericError
 #
 # Since: 2.4
@@ -2346,7 +2346,7 @@
 #
 # Errors:
 #     - If @node is not a valid block device, DeviceNotFound
-#     - If @name is not found, GenericError with an explanation
+#     - If @name is not found, GenericError
 #
 # Since: 2.4
 #
@@ -2367,7 +2367,7 @@
 #
 # Errors:
 #     - If @node is not a valid block device, DeviceNotFound
-#     - If @name is not found, GenericError with an explanation
+#     - If @name is not found, GenericError
 #
 # Since: 4.0
 #
@@ -2388,7 +2388,7 @@
 #
 # Errors:
 #     - If @node is not a valid block device, DeviceNotFound
-#     - If @name is not found, GenericError with an explanation
+#     - If @name is not found, GenericError
 #
 # Since: 4.0
 #
@@ -2462,7 +2462,6 @@
 # Errors:
 #     - If @node is not a valid block device, DeviceNotFound
 #     - If @name is not found or if hashing has failed, GenericError
-#       with an explanation
 #
 # Since: 2.10
 ##
Signature · 1 line
2.46.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] qapi: Drop "with an explanation" from error descriptions

Quoted 8 lines · Markus Armbruster

All errors come with an explanation, namely the human-readable error message in the error response's @desc member. Drop the redundant "with an explanation" phrase.

---
 qapi/block-core.json | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
#3 lore raw

PATCH 2/2 qapi/block-core: Drop drive-backup's "Any other error" documentation

In reply to Markus Armbruster

We've always been rather lax about documenting errors. Many "Errors" sections are obviously not exhaustive. Only drive-backup is explicit about this: "Any other error returns a GenericError".

Not useful. Drop.

---
 qapi/block-core.json | 1 -
 1 file changed, 1 deletion(-)
qapi/block-core.json +0 -1
index 82f59a7758..485388be32 100644
@@ -1853,7 +1853,6 @@
 #
 # Errors:
 #     - If @device does not exist, DeviceNotFound
-#     - Any other error returns a GenericError.
 #
 # Since: 1.3
 #
Signature · 1 line
2.46.0
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] qapi/block-core: Drop drive-backup's "Any other error" documentation

Quoted 10 lines · Markus Armbruster

We've always been rather lax about documenting errors. Many "Errors" sections are obviously not exhaustive. Only drive-backup is explicit about this: "Any other error returns a GenericError".

Not useful. Drop.

---
 qapi/block-core.json | 1 -
 1 file changed, 1 deletion(-)
Quoted 16 lines
qapi/block-core.json +0 -1
index 82f59a7758..485388be32 100644
@@ -1853,7 +1853,6 @@
 #
 # Errors:
 #     - If @device does not exist, DeviceNotFound
-#     - Any other error returns a GenericError.
 #
 # Since: 1.3
 #
Signature · 1 line
2.46.0
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org