提交 04231acb 编写于 作者: R Richard W.M. Jones

Thu May 3 15:03:00 BST 2007 Richard Jones <rjones@redhat.com>

	* src/virterror.c, include/libvirt/virterror.h: Added
	  VIR_FROM_REMOTE, VIR_ERR_RPC, VIR_ERR_GNUTLS_ERROR
	  for remote errors.
上级 5b74f3c2
Thu May 3 15:03:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/virterror.c, include/libvirt/virterror.h: Added
VIR_FROM_REMOTE, VIR_ERR_RPC, VIR_ERR_GNUTLS_ERROR
for remote errors.
Wed May 2 18:42:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/libvirt.c, src/qemu_internal.c: Allow network
......
......@@ -50,6 +50,7 @@ typedef enum {
VIR_FROM_QEMU, /* Error at the QEMU daemon */
VIR_FROM_NET, /* Error when operating on a network */
VIR_FROM_TEST, /* Error from test driver */
VIR_FROM_REMOTE, /* Error from remote driver */
} virErrorDomain;
......@@ -121,6 +122,8 @@ typedef enum {
VIR_ERR_INVALID_NETWORK, /* invalid network object */
VIR_ERR_NETWORK_EXIST, /* the network already exist */
VIR_ERR_SYSTEM_ERROR, /* general system call failure */
VIR_ERR_RPC, /* some sort of RPC error */
VIR_ERR_GNUTLS_ERROR, /* error from a GNUTLS call */
} virErrorNumber;
/**
......
......@@ -277,6 +277,9 @@ virDefaultErrorFunc(virErrorPtr err)
case VIR_FROM_TEST:
dom = "Test ";
break;
case VIR_FROM_REMOTE:
dom = "Remote ";
break;
}
if ((err->dom != NULL) && (err->code != VIR_ERR_INVALID_DOMAIN)) {
domain = err->dom->name;
......@@ -613,6 +616,18 @@ __virErrorMsg(virErrorNumber error, const char *info)
else
errmsg = "%s";
break;
case VIR_ERR_RPC:
if (info == NULL)
errmsg = _("RPC error");
else
errmsg = "%s";
break;
case VIR_ERR_GNUTLS_ERROR:
if (info == NULL)
errmsg = _("GNUTLS call error");
else
errmsg = "%s";
break;
}
return (errmsg);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册