diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-06-22 18:30:13 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-06-22 18:30:13 +0000 |
commit | 7c987a296324d3e28dd27086600c2e51d07ae721 (patch) | |
tree | a2f56a8ab6e91f24f3469b866743ad8f2b3ed20b /pjlib/src/pj/errno.c | |
parent | aebddd09236b938f3d535f888cbc339b92a40817 (diff) |
Added the error code into error messages
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@534 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/errno.c')
-rw-r--r-- | pjlib/src/pj/errno.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/pjlib/src/pj/errno.c b/pjlib/src/pj/errno.c index 086bfcd7..da06f996 100644 --- a/pjlib/src/pj/errno.c +++ b/pjlib/src/pj/errno.c @@ -40,28 +40,30 @@ static struct err_msg_hnd /* PJLIB's own error codes/messages */ #if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0 + static const struct { int code; const char *msg; } err_str[] = { - { PJ_EUNKNOWN, "Unknown Error" }, - { PJ_EPENDING, "Pending operation" }, - { PJ_ETOOMANYCONN, "Too many connecting sockets" }, - { PJ_EINVAL, "Invalid value or argument" }, - { PJ_ENAMETOOLONG, "Name too long" }, - { PJ_ENOTFOUND, "Not found" }, - { PJ_ENOMEM, "Not enough memory" }, - { PJ_EBUG, "BUG DETECTED!" }, - { PJ_ETIMEDOUT, "Operation timed out" }, - { PJ_ETOOMANY, "Too many objects of the specified type"}, - { PJ_EBUSY, "Object is busy"}, - { PJ_ENOTSUP, "Option/operation is not supported"}, - { PJ_EINVALIDOP, "Invalid operation"}, - { PJ_ECANCELLED, "Operation cancelled"}, - { PJ_EEXISTS, "Object already exists" }, - { PJ_EEOF, "End of file" }, + PJ_BUILD_ERR(PJ_EUNKNOWN, "Unknown Error" ), + PJ_BUILD_ERR(PJ_EPENDING, "Pending operation" ), + PJ_BUILD_ERR(PJ_ETOOMANYCONN, "Too many connecting sockets" ), + PJ_BUILD_ERR(PJ_EINVAL, "Invalid value or argument" ), + PJ_BUILD_ERR(PJ_ENAMETOOLONG, "Name too long" ), + PJ_BUILD_ERR(PJ_ENOTFOUND, "Not found" ), + PJ_BUILD_ERR(PJ_ENOMEM, "Not enough memory" ), + PJ_BUILD_ERR(PJ_EBUG, "BUG DETECTED!" ), + PJ_BUILD_ERR(PJ_ETIMEDOUT, "Operation timed out" ), + PJ_BUILD_ERR(PJ_ETOOMANY, "Too many objects of the specified type"), + PJ_BUILD_ERR(PJ_EBUSY, "Object is busy"), + PJ_BUILD_ERR(PJ_ENOTSUP, "Option/operation is not supported"), + PJ_BUILD_ERR(PJ_EINVALIDOP, "Invalid operation"), + PJ_BUILD_ERR(PJ_ECANCELLED, "Operation cancelled"), + PJ_BUILD_ERR(PJ_EEXISTS, "Object already exists" ), + PJ_BUILD_ERR(PJ_EEOF, "End of file" ), + PJ_BUILD_ERR(PJ_ETOOBIG, "Size is too big"), }; #endif /* PJ_HAS_ERROR_STRING */ |