aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-24 09:22:42 -0700
committerRichard Henderson <richard.henderson@linaro.org>2024-04-24 09:22:42 -0700
commit1e0a7549e1f93112a2c0c08d95eb16b604d32cca (patch)
tree508ee16114940096bc0040a9ea145bf3ea7c2026 /qapi
parent88daa112d4eda4e6c29f9f7004be09c13e4785df (diff)
parentbe842efbe3102c6aa1980039f6d4a8f997f1ff8c (diff)
downloadqemu-1e0a7549e1f93112a2c0c08d95eb16b604d32cca.zip
qemu-1e0a7549e1f93112a2c0c08d95eb16b604d32cca.tar.gz
qemu-1e0a7549e1f93112a2c0c08d95eb16b604d32cca.tar.bz2
Merge tag 'pull-error-2024-04-24' of https://repo.or.cz/qemu/armbru into staging
Error reporting patches for 2024-04-24 # -----BEGIN PGP SIGNATURE----- # # iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmYouloSHGFybWJydUBy # ZWRoYXQuY29tAAoJEDhwtADrkYZTzLwP+wQjCWJHpTB+uQ3+U5Tb77BUJxuEjDMj # txNIJBXHOo7erxTSCieLuQICm8e30z62QAK4nVStyMDcyGh1KfwdSDAxBFnuLpA2 # 7X5bXbvCrm4vXVASRTV1zKCYDlIXFfrMWLvN5KgM90RsodLcy0szlXg+qYyoIM3Z # 8zp0Ug0fQPFHiOAQJi9ZTOsCYJBhZc2sbzgQEmf/g6q9bJaZHzPEHvVT4AQhTAtn # 7BIJY+vGDZNZwbP/0obWy2lai3kbGak8OXpwq/bewdrxeRmvqmM7sk+V/P2tXQD+ # kZe0/HWuDoO5J8L3KHiJnBJ0KCk8fbo4I0T6v9vf55Sj8K0r7O9sykgXXWv8q0lO # GrQa0YcyWAckI41stYQpwEpIlRanuZv/p8OZFJIqsTAfaw7RlbIBYA9xZCUnTton # FbHO/t2BLfo8eO9/xRD4r1u6vMbVozImPETuUMPyLHzlrdw2thxddKQNInHYYZ2U # SvvaByceEP2UywOnOflZhVL2dIhhnrBztiW2Vqod1fQHpfBAcJn909PZIlPZyMkr # gUnABI/rtC/lW3pBee6HmfzJ6Fah0e0XCpCY20qFe27Bi/z3xKi5NWYuyAUG5csp # CuTsc4pXfPVj5Z+Mk4pyY8PK5k4jSa7vAVLCLTNzXJLZlJTb6yuf0HsJ7768nHDc # hSEIjLwQWYtw # =r8Rv # -----END PGP SIGNATURE----- # gpg: Signature made Wed 24 Apr 2024 12:52:58 AM PDT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [undefined] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * tag 'pull-error-2024-04-24' of https://repo.or.cz/qemu/armbru: qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition qapi: Inline and remove QERR_MIGRATION_ACTIVE definition qapi: Correct error message for 'vcpu_dirty_limit' parameter qapi: Inline and remove QERR_INVALID_PARAMETER_TYPE definition qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant value) qapi: Inline and remove QERR_INVALID_PARAMETER definition qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition error: Drop superfluous #include "qapi/qmp/qerror.h" Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/opts-visitor.c2
-rw-r--r--qapi/qobject-input-visitor.c32
-rw-r--r--qapi/string-input-visitor.c8
3 files changed, 21 insertions, 21 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index 8f1efab..3d1a28b 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -184,7 +184,7 @@ opts_check_struct(Visitor *v, Error **errp)
const QemuOpt *first;
first = g_queue_peek_head(any);
- error_setg(errp, QERR_INVALID_PARAMETER, first->name);
+ error_setg(errp, "Invalid parameter '%s'", first->name);
return false;
}
return true;
diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c
index 3e8aca6..f110a80 100644
--- a/qapi/qobject-input-visitor.c
+++ b/qapi/qobject-input-visitor.c
@@ -288,8 +288,8 @@ static bool qobject_input_start_struct(Visitor *v, const char *name, void **obj,
return false;
}
if (qobject_type(qobj) != QTYPE_QDICT) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "object");
+ error_setg(errp, "Invalid parameter type for '%s', expected: object",
+ full_name(qiv, name));
return false;
}
@@ -326,8 +326,8 @@ static bool qobject_input_start_list(Visitor *v, const char *name,
return false;
}
if (qobject_type(qobj) != QTYPE_QLIST) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "array");
+ error_setg(errp, "Invalid parameter type for '%s', expected: array",
+ full_name(qiv, name));
return false;
}
@@ -405,8 +405,8 @@ static bool qobject_input_type_int64(Visitor *v, const char *name, int64_t *obj,
}
qnum = qobject_to(QNum, qobj);
if (!qnum || !qnum_get_try_int(qnum, obj)) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "integer");
+ error_setg(errp, "Invalid parameter type for '%s', expected: integer",
+ full_name(qiv, name));
return false;
}
return true;
@@ -494,8 +494,8 @@ static bool qobject_input_type_bool(Visitor *v, const char *name, bool *obj,
}
qbool = qobject_to(QBool, qobj);
if (!qbool) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "boolean");
+ error_setg(errp, "Invalid parameter type for '%s', expected: boolean",
+ full_name(qiv, name));
return false;
}
@@ -534,8 +534,8 @@ static bool qobject_input_type_str(Visitor *v, const char *name, char **obj,
}
qstr = qobject_to(QString, qobj);
if (!qstr) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "string");
+ error_setg(errp, "Invalid parameter type for '%s', expected: string",
+ full_name(qiv, name));
return false;
}
@@ -565,8 +565,8 @@ static bool qobject_input_type_number(Visitor *v, const char *name, double *obj,
}
qnum = qobject_to(QNum, qobj);
if (!qnum) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "number");
+ error_setg(errp, "Invalid parameter type for '%s', expected: number",
+ full_name(qiv, name));
return false;
}
@@ -587,8 +587,8 @@ static bool qobject_input_type_number_keyval(Visitor *v, const char *name,
if (qemu_strtod_finite(str, NULL, &val)) {
/* TODO report -ERANGE more nicely */
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "number");
+ error_setg(errp, "Invalid parameter type for '%s', expected: number",
+ full_name(qiv, name));
return false;
}
@@ -623,8 +623,8 @@ static bool qobject_input_type_null(Visitor *v, const char *name,
}
if (qobject_type(qobj) != QTYPE_QNULL) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE,
- full_name(qiv, name), "null");
+ error_setg(errp, "Invalid parameter type for '%s', expected: null",
+ full_name(qiv, name));
return false;
}
*obj = qnull();
diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c
index 197139c..3f1b9e9 100644
--- a/qapi/string-input-visitor.c
+++ b/qapi/string-input-visitor.c
@@ -353,8 +353,8 @@ static bool parse_type_number(Visitor *v, const char *name, double *obj,
assert(siv->lm == LM_NONE);
if (qemu_strtod_finite(siv->string, NULL, &val)) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
- "number");
+ error_setg(errp, "Invalid parameter type for '%s', expected: number",
+ name ? name : "null");
return false;
}
@@ -371,8 +371,8 @@ static bool parse_type_null(Visitor *v, const char *name, QNull **obj,
*obj = NULL;
if (siv->string[0]) {
- error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
- "null");
+ error_setg(errp, "Invalid parameter type for '%s', expected: null",
+ name ? name : "null");
return false;
}