httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Re: concerns about the recent error checking added to APR
Date Thu, 06 Apr 2000 17:01:43 GMT
> > Some of the other error checking (e.g., return APR_EBADARG if some
> > parameter is NULL) looks nice on the surface, but it is truly bad.
> >
> > An app developer should hit the places where bad parms were passed to
> > APR in the course of their normal testing.
>
> I'm not sure I agree with this.  I'm not sure I disagree either.  I am
> torn on this issue.

I agree with Jeff on this one. Better to fail in an obvious and noticable
way (a segfault).  IMHO, APR should trust the application developer to use
the APIs correctly.  Otherwise you gorp up the code with all sorts of
trivial error checking.  If the application doesn't use the API correctly,
then it 'deserves what it gets' :-). Okay, I will make a generalization and
like most generalizations, it doesn't always apply...   You should not add
error checking to detect programming errors within the scope of the code you
have access to and control (and can change). In other words, Apache and APR
should trust the other to do the right thing.

Bill


Mime
View raw message