Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
77ad7a6b
...
77ad7a6b479bf2b417b182d95084837b3a4249fb
authored
2004-12-06 14:03:04 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added new error codes
1 parent
32490c98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
include/mailutils/errno.h
mailbox/muerrno.c
include/mailutils/errno.h
View file @
77ad7a6
...
...
@@ -97,6 +97,23 @@ extern "C" {
/* Requested item not found */
#define MU_ERR_BUFSPACE (MU_ERR_BASE + 40)
/* Not enough buffer space */
#define MU_ERR_SQL (MU_ERR_BASE + 41)
/* SQL error */
#define MU_ERR_DB_ALREADY_CONNECTED (MU_ERR_BASE + 42)
/* Already connected to the database */
#define MU_ERR_DB_NOT_CONNECTED (MU_ERR_BASE + 43)
/* Not connected to the database */
#define MU_ERR_RESULT_NOT_RELEASED (MU_ERR_BASE + 44)
/* Result of the previous query is not released */
#define MU_ERR_NO_QUERY (MU_ERR_BASE + 45)
/* No query was executed */
#define MU_ERR_BAD_COLUMN (MU_ERR_BASE + 46)
/* Bad column address */
#define MU_ERR_NO_RESULT (MU_ERR_BASE + 47)
/* No result from the previous query available */
#define MU_ERR_NO_INTERFACE (MU_ERR_BASE + 48)
/* No such interface */
const
char
*
mu_errname
__P
((
int
e
));
const
char
*
mu_strerror
__P
((
int
e
));
...
...
mailbox/muerrno.c
View file @
77ad7a6
...
...
@@ -99,6 +99,15 @@ mu_errname (int e)
EN
(
MU_ERR_PARSE
);
EN
(
MU_ERR_NOENT
);
EN
(
MU_ERR_BUFSPACE
);
EN
(
MU_ERR_SQL
);
EN
(
MU_ERR_DB_ALREADY_CONNECTED
);
EN
(
MU_ERR_DB_NOT_CONNECTED
);
EN
(
MU_ERR_RESULT_NOT_RELEASED
);
EN
(
MU_ERR_NO_QUERY
);
EN
(
MU_ERR_BAD_COLUMN
);
EN
(
MU_ERR_NO_RESULT
);
EN
(
MU_ERR_NO_INTERFACE
);
}
snprintf
(
buf
,
sizeof
buf
,
_
(
"Error %d"
),
e
);
...
...
@@ -167,6 +176,16 @@ mu_strerror (int e)
ES
(
MU_ERR_PARSE
,
_
(
"Parse error"
));
ES
(
MU_ERR_NOENT
,
_
(
"Requested item not found"
));
ES
(
MU_ERR_BUFSPACE
,
_
(
"Not enough buffer space"
));
ES
(
MU_ERR_SQL
,
_
(
"SQL error"
));
ES
(
MU_ERR_DB_ALREADY_CONNECTED
,
_
(
"Already connected to the database"
));
ES
(
MU_ERR_DB_NOT_CONNECTED
,
_
(
"Not connected to the database"
));
ES
(
MU_ERR_RESULT_NOT_RELEASED
,
_
(
"Result of the previous query is not released"
));
ES
(
MU_ERR_NO_QUERY
,
_
(
"No query was executed"
));
ES
(
MU_ERR_BAD_COLUMN
,
_
(
"Bad column address"
));
ES
(
MU_ERR_NO_RESULT
,
_
(
"No result from the previous query available"
));
ES
(
MU_ERR_NO_INTERFACE
,
_
(
"No such interface"
));
}
return
msg
?
msg
:
strerror
(
e
);
...
...
Please
register
or
sign in
to post a comment