httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Change to Error logging routines.
Date Thu, 21 Oct 1999 15:46:38 GMT

> Ok, being able to report system error messages is a great goal but for all
> other purposes it reduces the usefulness of the error code to that of a
> boolean success/fail indicator.

Yep.  But looking through Apache, that's what they are used for most often
anyway.  I guess that's been a common theme in APR development.  APR is
there to REALLY help with the most common operations.  Reading/writing a
file, boolean error checks, etc.  APR succeeds there, but if you want to
do more complicated stuff, like actually branch on the error, APR may
require the programmer to do a bit more work.  I think this is fine,
because 90% of the time we are making programming cross-platform much
easier.  The 10% where it is just as hard as it always was, isn't a big

> >This is not a big issue I think. Most of the time you are checking for
> >APR_SUCCESS. If you don't get it, you cut an error message and stop whatever
> >it is you are doing. There are few places in Apache that take multiple
> >branches based on an return codes.
> Most, maybe, but sometimes you really want to behave differently depending on
> which error occurred, often to distinguish between fatal & non-fatal errors.
> Perhaps something like my os2errno() function could become a public API, say 
> int ap_status_errno(ap_status_t);
> that could be used to map the system error codes to errno values when you
> actually want to know what type of error occurred.

We would either need ap_status_errno, or we need to ifdef the code.  Bill
says converting Windows Error values to errno's is not easy, which is what
precipitated this change.  If it is as difficult as he seems to think it
is, I would rather just ifdef the code, I think.  If it is easy, but
time-consuming (programming time, not run-time), I would probably rather
have the function.


Ryan Bloom
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	

View raw message