mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
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: John Ferlan <jferlan@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
68a6861902
commit
7b324eedb7
@ -835,7 +835,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;
|
||||
}
|
||||
|
||||
@ -894,7 +895,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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user