httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Magnuson <smagnu...@aventail.com>
Subject ap_errno.h
Date Wed, 10 May 2000 16:58:40 GMT

Is there some good reason we've typedef'd ap_status_t to an int, and
#define'd a bunch of error codes? 

I would like to see something change in ap_errno.h to make life a little
easier. Its not difficult - but frustrating to figure out an error number
when non APR_SUCCESS is returned. Perhaps something like:
  
typedef enum _ap_status_t
{
APR_SUCCESS = 0,

/* errors... */
APR_OS_ERROR=APR_OS_START_ERROR,
APR_ENOSTAT,
APR_ENOPOOL,
APR_ENOFILE,
.
.
/* statuses.. */
APR_OS_STATUS=APR_OS_START_STATUS,
APR_INCHILD,
APR_INPARENT,
.
.
} ap_status_t;

This would at least give us symbolic names in a debugger, the reason I use
the bases as I do is simply so I can compare against a symbolic name - and
can see that as well in the debugger, we could (if it was a design goal)
continue to use offsets for each error, however what we currently have is
gross.

Just a thought anyway.

//Sam

-- 
Sam Magnuson <smagnuson@aventail.com>

Mime
View raw message