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:
Paolo Bonzini 2014-05-14 17:43:13 +08:00 committed by Michael S. Tsirkin
parent 4932b8971b
commit d116946424
1 changed files with 1 additions and 1 deletions

2
qmp.c
View File

@ -540,7 +540,7 @@ void object_add(const char *type, const char *id, const QDict *qdict,
klass = object_class_by_name(type);
if (!klass) {
error_setg(errp, "invalid class name");
error_setg(errp, "invalid object type: %s", type);
return;
}