apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Leggett" <minf...@sharp.fm>
Subject Re: svn commit: r523390 - /apr/apr-util/trunk/ssl/apr_ssl_openssl.c
Date Wed, 28 Mar 2007 16:27:08 GMT
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.


View raw message