apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: cvs commit: apr/misc/unix errorcodes.c
Date Sat, 19 May 2001 19:42:31 GMT
On 19 May 2001 dreid@apache.org wrote:

>   --- apr_errno.h	2001/05/13 12:03:28	1.62
>   +++ apr_errno.h	2001/05/19 13:53:06	1.63
>   @@ -180,9 +180,11 @@
>     * APR_EGENERAL     General failure (specific information not available)
>     * APR_EBADIP       The specified IP address is invalid
>     * APR_EBADMASK     The specified netmask is invalid
>   - * APR_ENOCLEANUP     There is no memory cleanup available
>   - * APR_EMEMSYS        An invalid memory system was passed in to an
>   - *                    apr_sms function
>   + * APR_ENOCLEANUP   There is no memory cleanup available
>   + * APR_EMEMSYS      An invalid memory system was passed in to an
>   + *                  apr_sms function
>   + * APR_EMEMFUNC     A function was called that isn't available in the
>   + *                  selected memory system

I really dislike the proliferation of "single use" error return codes.  I
can't complain too loudly about what you've done here because you've
followed precedent AFAICT... I just don't like the precedent.  =-)

For example, I don't see why these newest ones that've been added can't be
handled within the definition of existing codes.  Why can't APR_ENOTIMPL
and APR_EINVAL do the job here?

Then there's the problem of an error code sounding bigger in scope than it
is.  APR_ENOCLEANUP is a perfect example.  If we're going to have a code
named like that, then why should it be limited to being used only by the
memory system?  Why wouldn't that be used in more general cases?  (I can't
think of a good example at the moment, but I hope you see what I'm getting
at anyway.)

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message