httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: ap_canonical_error ?
Date Sat, 10 Jun 2000 00:39:25 GMT

No, this is because we don't want to have to try to convert to
canonical errors within every APR function.

If we call an APR function and get an error back, we have multiple
options.  That error can be passed directly to ap_strerror or can be
passed to ap_canonical_error.  If it is passed to ap_strerror, we get a
human readable string.  If it is passed to ap_canonical error, we get a
value that is available on all platforms that best represents the error.

We cannot just return a canonical error, because that is a lossy
operation.  Windows and OS/2 have far more error values than Unix
platforms.  If we convert to canonical error inside the APR function, we
cannot pass that value to ap_strerror and get reasonable string back from
the platform's error string generator.

This is all explained in APRDesign, and it was hashed out in great deal on
the list.  If you need more detail, please let me know, and I will write
up a small doc in the APR docs directory.

Ryan

On Fri, 9 Jun 2000, dean gaudet wrote:

> what is this for?
> 
> wouldn't it be more clean to just have APR return the "canonical" error?
> 
> i assume this is to deal with the broken platforms that have EAGAIN !=
> EWOULDBLOCK...
> 
> -dean
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message