* TODO: updated

* include/virterror.h src/internal.h src/libvirt.c src/virterror.c
  src/xend_internal.c: commiting a first pass at adding error handling
  in the code, not finished, but it starts to work, need more coverage
  and testing.
Daniel
This commit is contained in:
Daniel Veillard
2006-02-27 16:27:18 +00:00
parent 4d9187a696
commit 596b601021
8 changed files with 486 additions and 49 deletions
+9 -3
View File
@@ -53,7 +53,7 @@ typedef enum {
typedef struct _virError virError;
typedef virError *virErrorPtr;
struct _virError {
int code; /* The error code, e.g. an virParserError */
int code; /* The error code, a virErrorNumber */
int domain; /* What part of the library raised this error */
char *message;/* human-readable informative error message */
virErrorLevel level;/* how consequent is the error */
@@ -73,8 +73,14 @@ struct _virError {
*/
typedef enum {
VIR_ERR_OK = 0,
VIR_ERR_INTERNAL_ERROR, /* 1 */
VIR_ERR_NO_MEMORY /* 2 */
VIR_ERR_INTERNAL_ERROR, /* internal error */
VIR_ERR_NO_MEMORY, /* memory allocation failure */
VIR_ERR_NO_SUPPORT, /* no support for this connection */
VIR_ERR_NO_CONNECT, /* can't connect to hypervisor */
VIR_ERR_INVALID_CONN,/* invalid connection object */
VIR_ERR_INVALID_DOMAIN,/* invalid domain object */
VIR_ERR_INVALID_ARG,/* invalid function argument */
VIR_ERR_OPERATION_FAILED,/* a command to hypervisor failed */
} virErrorNumber;
/**
+9 -3
View File
@@ -53,7 +53,7 @@ typedef enum {
typedef struct _virError virError;
typedef virError *virErrorPtr;
struct _virError {
int code; /* The error code, e.g. an virParserError */
int code; /* The error code, a virErrorNumber */
int domain; /* What part of the library raised this error */
char *message;/* human-readable informative error message */
virErrorLevel level;/* how consequent is the error */
@@ -73,8 +73,14 @@ struct _virError {
*/
typedef enum {
VIR_ERR_OK = 0,
VIR_ERR_INTERNAL_ERROR, /* 1 */
VIR_ERR_NO_MEMORY /* 2 */
VIR_ERR_INTERNAL_ERROR, /* internal error */
VIR_ERR_NO_MEMORY, /* memory allocation failure */
VIR_ERR_NO_SUPPORT, /* no support for this connection */
VIR_ERR_NO_CONNECT, /* can't connect to hypervisor */
VIR_ERR_INVALID_CONN,/* invalid connection object */
VIR_ERR_INVALID_DOMAIN,/* invalid domain object */
VIR_ERR_INVALID_ARG,/* invalid function argument */
VIR_ERR_OPERATION_FAILED,/* a command to hypervisor failed */
} virErrorNumber;
/**