GME  13
Modules | Defines | Typedefs | Functions | Variables
Error Codes
Collaboration diagram for Error Codes:

Modules

 APR Error Space
 APR Error Values
 Status Value Tests

Defines

#define APR_OS_START_ERROR   20000
#define APR_OS_ERRSPACE_SIZE   50000
#define APR_UTIL_ERRSPACE_SIZE   20000
#define APR_OS_START_STATUS   (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
#define APR_UTIL_START_STATUS
#define APR_OS_START_USERERR   (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE)
#define APR_OS_START_USEERR   APR_OS_START_USERERR
#define APR_OS_START_CANONERR
#define APR_OS_START_EAIERR   (APR_OS_START_CANONERR + APR_OS_ERRSPACE_SIZE)
#define APR_OS_START_SYSERR   (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE)
#define APR_SUCCESS   0
#define APR_FROM_OS_ERROR(e)   (e)
#define APR_TO_OS_ERROR(e)   (e)
#define apr_get_os_error()   (errno)
#define apr_set_os_error(e)   (errno = (e))
#define apr_get_netos_error()   (errno)
#define apr_set_netos_error(e)   (errno = (e))

Typedefs

typedef int apr_status_t

Functions

 APR_DECLARE (char *) apr_strerror(apr_status_t statcode

Variables

char * buf
char apr_size_t bufsize

Define Documentation

#define APR_FROM_OS_ERROR (   e)    (e)

Definition at line 1192 of file apr_errno.h.

#define apr_get_netos_error ( )    (errno)

Definition at line 1200 of file apr_errno.h.

#define apr_get_os_error ( )    (errno)

Definition at line 1195 of file apr_errno.h.

#define APR_OS_ERRSPACE_SIZE   50000

APR_OS_ERRSPACE_SIZE is the maximum number of errors you can fit into one of the error/status ranges below -- except for APR_OS_START_USERERR, which see.

Definition at line 123 of file apr_errno.h.

Value:

APR_OS_START_CANONERR is where APR versions of errno values are defined on systems which don't have the corresponding errno.

Definition at line 174 of file apr_errno.h.

APR_OS_START_EAIERR folds EAI_ error codes from getaddrinfo() into apr_status_t values.

Definition at line 180 of file apr_errno.h.

#define APR_OS_START_ERROR   20000

APR_OS_START_ERROR is where the APR specific error values start.

Definition at line 117 of file apr_errno.h.

APR_OS_START_STATUS is where the APR specific status codes start.

Definition at line 136 of file apr_errno.h.

APR_OS_START_SYSERR folds platform-specific system error values into apr_status_t values.

Definition at line 185 of file apr_errno.h.

APR_OS_START_USEERR is obsolete, defined for compatibility only. Use APR_OS_START_USERERR instead.

Definition at line 169 of file apr_errno.h.

APR_OS_START_USERERR are reserved for applications that use APR that layer their own error codes along with APR's. Note that the error immediately following this one is set ten times farther away than usual, so that users of apr have a lot of room in which to declare custom error codes.

In general applications should try and create unique error codes. To try and assist in finding suitable ranges of numbers to use, the following ranges are known to be used by the listed applications. If your application defines error codes please advise the range of numbers it uses to dev@apr.apache.org for inclusion in this list.

Ranges shown are in relation to APR_OS_START_USERERR

Subversion - Defined ranges, of less than 100, at intervals of 5000 starting at an offset of 5000, e.g. +5000 to 5100, +10000 to 10100

Apache HTTPD - +2000 to 2999

Definition at line 164 of file apr_errno.h.

#define apr_set_netos_error (   e)    (errno = (e))

Definition at line 1201 of file apr_errno.h.

#define apr_set_os_error (   e)    (errno = (e))

Definition at line 1196 of file apr_errno.h.

#define APR_SUCCESS   0

no error.

Definition at line 225 of file apr_errno.h.

#define APR_TO_OS_ERROR (   e)    (e)

Definition at line 1193 of file apr_errno.h.

#define APR_UTIL_ERRSPACE_SIZE   20000

APR_UTIL_ERRSPACE_SIZE is the size of the space that is reserved for use within apr-util. This space is reserved above that used by APR internally.

Note:
This number MUST be smaller than APR_OS_ERRSPACE_SIZE by a large enough amount that APR has sufficient room for it's codes.

Definition at line 132 of file apr_errno.h.

Value:

APR_UTIL_START_STATUS is where APR-Util starts defining it's status codes.

Definition at line 141 of file apr_errno.h.


Typedef Documentation

typedef int apr_status_t

Type for specifying an error or status code.

Definition at line 44 of file apr_errno.h.


Function Documentation

APR_DECLARE ( char *  )

Return a human readable string describing the specified error.

Parameters:
statcodeThe error code the get a string for.
bufA buffer to hold the error string.
bufsizeSize of the buffer to hold the string.

Variable Documentation

const char * buf

Definition at line 52 of file apr_errno.h.

char apr_size_t bufsize

Definition at line 52 of file apr_errno.h.