qmp: improve error reporting for -object and object-add
Use QERR_INVALID_PARAMETER_VALUE for consistency. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
4932b8971b
commit
d116946424
2
qmp.c
2
qmp.c
@ -540,7 +540,7 @@ void object_add(const char *type, const char *id, const QDict *qdict,
|
|||||||
|
|
||||||
klass = object_class_by_name(type);
|
klass = object_class_by_name(type);
|
||||||
if (!klass) {
|
if (!klass) {
|
||||||
error_setg(errp, "invalid class name");
|
error_setg(errp, "invalid object type: %s", type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user