提交 b5180453 编写于 作者: C Cole Robinson

virdbus: Show method name in error message

If you trigger bug 1033369, we get the error message:

  error from service: Invalid argument

Which is a bit too generic to pinpoint what is actually failing. This
changes it to:

  error from service: CreateMachine: Invalid argument
Acked-by: NEric Blake <eblake@redhat.com>
上级 aa7fc495
......@@ -1408,7 +1408,8 @@ static int
virDBusCall(DBusConnection *conn,
DBusMessage *call,
DBusMessage **replyout,
DBusError *error)
DBusError *error,
const char *member)
{
DBusMessage *reply = NULL;
DBusError localerror;
......@@ -1424,7 +1425,7 @@ virDBusCall(DBusConnection *conn,
if (error)
ret = 0;
else {
virReportError(VIR_ERR_DBUS_SERVICE, "%s",
virReportError(VIR_ERR_DBUS_SERVICE, _("%s: %s"), member,
localerror.message ? localerror.message : _("unknown error"));
}
goto cleanup;
......@@ -1502,7 +1503,7 @@ int virDBusCallMethod(DBusConnection *conn,
ret = -1;
ret = virDBusCall(conn, call, replyout, error);
ret = virDBusCall(conn, call, replyout, error, member);
cleanup:
if (call)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册