提交 7b324eed 编写于 作者: J John Ferlan

vmware: Add more descriptive error message on Find failure

If vmwareDomainLookupByID or vmwareDomainLookupByName fails
to find a vm, let's be a bit more descriptive by providing
the failing id or name in the error message.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
上级 68a68619
...@@ -835,7 +835,8 @@ vmwareDomainLookupByID(virConnectPtr conn, int id) ...@@ -835,7 +835,8 @@ vmwareDomainLookupByID(virConnectPtr conn, int id)
vmwareDriverUnlock(driver); vmwareDriverUnlock(driver);
if (!vm) { if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL); virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching id '%d'"), id);
goto cleanup; goto cleanup;
} }
...@@ -894,7 +895,8 @@ vmwareDomainLookupByName(virConnectPtr conn, const char *name) ...@@ -894,7 +895,8 @@ vmwareDomainLookupByName(virConnectPtr conn, const char *name)
vmwareDriverUnlock(driver); vmwareDriverUnlock(driver);
if (!vm) { if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL); virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching name '%s'"), name);
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册