apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Reid <da...@jetnet.co.uk>
Subject Generic errors
Date Thu, 29 Mar 2007 09:11:52 GMT
I'd like to take Grahams idea for ldap and move it into "core" apr. The
idea would be morphed slightly to work as shown below.

We add a new structure, apr_err_generic_t which is used to contain
details of an error that can't be described by a single code. The intent
is that it's used when an underlying "subsystem" that apr relies on
generates an error - ie the ldap daemon reports a problem or mysql can't
process a query.

When this happens the function return APR_EGENERIC which means that the
user knows a problem happens, that it was related to a subsystem and
that there is more information available. They would then call another
function to get the error structure. This could then be used to generate
an error string via apr.

I have some very basic code which I can send along, but before I do what
do people think? I think this adds a facility that could be useful and
used correctly could resolve a lot of the head scratching that apr can
generate when things go wrong in libraries we use.

david

Mime
View raw message