On Wed, March 28, 2007 6:15 pm, [EMAIL PROTECTED] wrote:

> We need to add an error code for "there was an openssl error"
> to allow us to direct the user to call a function to determine
> what was wrong.
>
> Highlighted by Joe Orton

By way of example, the apr_ldap code tries to solve this problem by
returning a structure containing the original LDAP error code, the LDAP
toolkit's "error string" corresponding to that code, as well as a string
that tries to explain what APR was trying to do at the time of the error
(often the LDAP error is a red herring or too vague). Most of this info is
very cheap to produce.

The rationale behind it was to make it very easy for the (potentially
lazy) APR-using coder to expose useful information to the end user when
problems occurred.

What may be a useful exercise is to combine this into a generic "APR error
structure", so that the LDAP stuff, the SQL stuff, and the SSL stuff can
report errors in the same fashion.

Regards,
Graham
--


Reply via email to