summaryrefslogtreecommitdiff
path: root/pjlib/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-06-22 18:30:13 +0000
committerBenny Prijono <bennylp@teluu.com>2006-06-22 18:30:13 +0000
commit7c987a296324d3e28dd27086600c2e51d07ae721 (patch)
treea2f56a8ab6e91f24f3469b866743ad8f2b3ed20b /pjlib/include
parentaebddd09236b938f3d535f888cbc339b92a40817 (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/include')
-rw-r--r--pjlib/include/pj/errno.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/pjlib/include/pj/errno.h b/pjlib/include/pj/errno.h
index 8834a616..8b5906cb 100644
--- a/pjlib/include/pj/errno.h
+++ b/pjlib/include/pj/errno.h
@@ -66,7 +66,7 @@ PJ_BEGIN_DECL
/**
* Guidelines on error message length.
*/
-#define PJ_ERR_MSG_SIZE 64
+#define PJ_ERR_MSG_SIZE 80
/**
* Get the last platform error/status, folded into pj_status_t.
@@ -189,6 +189,18 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
*/
/**
+ * Use this macro to generate error message text for your error code,
+ * so that they look uniformly as the rest of the libraries.
+ *
+ * @param code The error code
+ * @param msg The error test.
+ */
+#ifndef PJ_BUILD_ERR
+# define PJ_BUILD_ERR(code,msg) { code, msg " (" #code ")" }
+#endif
+
+
+/**
* @hideinitializer
* Unknown error has been reported.
*/
@@ -268,6 +280,12 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
* End of file.
*/
#define PJ_EEOF (PJ_ERRNO_START_STATUS + 16)/* 70016 */
+/**
+ * @hideinitializer
+ * Size is too big.
+ */
+#define PJ_ETOOBIG (PJ_ERRNO_START_STATUS + 17)/* 70017 */
+
/** @} */ /* pj_errnum */