Ignore:
Timestamp:
Feb 2, 2006 7:15:03 PM (18 years ago)
Author:
bennylp
Message:

Added framework for attaching custom error message handler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/errno.h

    r66 r128  
    107107                               char *buf, pj_size_t bufsize); 
    108108 
     109/** 
     110 * Register strerror message handler for the specified error space. 
     111 * Application can register its own handler to supply the error message 
     112 * for the specified error code range. This handler will be called 
     113 * by #pj_strerror(). 
     114 * 
     115 * @param start_code    The starting error code where the handler should 
     116 *                      be called to retrieve the error message. 
     117 * @param err_space     The size of error space. The error code range then 
     118 *                      will fall in start_code to start_code+err_space-1 
     119 *                      range. 
     120 * @param f             The handler to be called when #pj_strerror() is 
     121 *                      supplied with error code that falls into this range. 
     122 * 
     123 * @return              PJ_SUCCESS or the specified error code. The  
     124 *                      registration may fail when the error space has been 
     125 *                      occupied by other handler, or when there are too many 
     126 *                      handlers registered to PJLIB. 
     127 */ 
     128PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code, 
     129                                          pj_status_t err_space, 
     130                                          pj_str_t (*f)(pj_status_t,char*, 
     131                                                        pj_size_t)); 
    109132 
    110133/** 
Note: See TracChangeset for help on using the changeset viewer.