httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <man...@io.com>
Subject Re: fprintf(stderr in Apache and APR.
Date Fri, 19 Nov 1999 07:03:01 GMT
On Thu, Nov 18, 1999 at 07:02:12AM -0500, Ryan Bloom wrote:
> I don't have any problem returning errors, I just want to make sure we do
> it with the least amount of pain to our users.

I dealt with this while killing program-wide errno in buff.

1. Per-object errno. It's not nearly as evil as program-wide errno,
and it allows you to easily support calls that are just so entrenched
in the C world that it becomes way too much trouble to deviate.

2. something like ap_bonerror() (no calcium jokes, Ken), which allows
you to register an action for when you get an error. This would allow
easy support for exit on error, like Greg was suggesting, but it's
more generic, providing some of the benefits of an exception-handling
language.

(1) seems okay for certain specific cases. (2) may be cool, but since I
don't think anyone will use it in the near future, it should be put
off 

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/

Mime
View raw message