mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +00:00
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:
parent
5b74f3c2cd
commit
04231acb2b
@ -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>
|
Wed May 2 18:42:00 BST 2007 Richard Jones <rjones@redhat.com>
|
||||||
|
|
||||||
* src/libvirt.c, src/qemu_internal.c: Allow network
|
* 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_QEMU, /* Error at the QEMU daemon */
|
||||||
VIR_FROM_NET, /* Error when operating on a network */
|
VIR_FROM_NET, /* Error when operating on a network */
|
||||||
VIR_FROM_TEST, /* Error from test driver */
|
VIR_FROM_TEST, /* Error from test driver */
|
||||||
|
VIR_FROM_REMOTE, /* Error from remote driver */
|
||||||
} virErrorDomain;
|
} virErrorDomain;
|
||||||
|
|
||||||
|
|
||||||
@ -121,6 +122,8 @@ typedef enum {
|
|||||||
VIR_ERR_INVALID_NETWORK, /* invalid network object */
|
VIR_ERR_INVALID_NETWORK, /* invalid network object */
|
||||||
VIR_ERR_NETWORK_EXIST, /* the network already exist */
|
VIR_ERR_NETWORK_EXIST, /* the network already exist */
|
||||||
VIR_ERR_SYSTEM_ERROR, /* general system call failure */
|
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;
|
} virErrorNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -277,6 +277,9 @@ virDefaultErrorFunc(virErrorPtr err)
|
|||||||
case VIR_FROM_TEST:
|
case VIR_FROM_TEST:
|
||||||
dom = "Test ";
|
dom = "Test ";
|
||||||
break;
|
break;
|
||||||
|
case VIR_FROM_REMOTE:
|
||||||
|
dom = "Remote ";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if ((err->dom != NULL) && (err->code != VIR_ERR_INVALID_DOMAIN)) {
|
if ((err->dom != NULL) && (err->code != VIR_ERR_INVALID_DOMAIN)) {
|
||||||
domain = err->dom->name;
|
domain = err->dom->name;
|
||||||
@ -613,6 +616,18 @@ __virErrorMsg(virErrorNumber error, const char *info)
|
|||||||
else
|
else
|
||||||
errmsg = "%s";
|
errmsg = "%s";
|
||||||
break;
|
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);
|
return (errmsg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user