You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Graham Leggett <mi...@sharp.fm> on 2007/03/28 18:27:08 UTC

Re: svn commit: r523390 - /apr/apr-util/trunk/ssl/apr_ssl_openssl.c

On Wed, March 28, 2007 6:15 pm, dreid@apache.org 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
--