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: John Ferlan <jferlan(a)redhat.com>
---
src/vmware/vmware_driver.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index 6c81e5feaa..d17fdfe3be 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -841,7 +841,8 @@ vmwareDomainLookupByID(virConnectPtr conn, int id)
vmwareDriverUnlock(driver);
if (!vm) {
- virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ virReportError(VIR_ERR_NO_DOMAIN,
+ _("no domain with matching id '%d'"), id);
goto cleanup;
}
@@ -900,7 +901,8 @@ vmwareDomainLookupByName(virConnectPtr conn, const char *name)
vmwareDriverUnlock(driver);
if (!vm) {
- virReportError(VIR_ERR_NO_DOMAIN, NULL);
+ virReportError(VIR_ERR_NO_DOMAIN,
+ _("no domain with matching name '%s'"), name);
goto cleanup;
}
--
2.13.6