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.
This commit is contained in:
Richard W.M. Jones 2007-05-03 14:00:18 +00:00
parent 5b74f3c2cd
commit 04231acb2b
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -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;
/**

View File

@ -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);
}