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

uml: Add more specific error message on failed FindBy call

Rather than an empty failed to find, let's provide a bit more
knowledge about what we failed to find by using the name string
or the id value.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 ff619e0e
......@@ -1385,7 +1385,8 @@ static virDomainPtr umlDomainLookupByID(virConnectPtr conn,
umlDriverUnlock(driver);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL);
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching id '%d'"), id);
goto cleanup;
}
......@@ -1433,7 +1434,8 @@ static virDomainPtr umlDomainLookupByName(virConnectPtr conn,
umlDriverUnlock(driver);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL);
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching name '%s'"), name);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册