In message <[EMAIL PROTECTED]> on Mon, 26 May 2003 08:57:40 +0200, Fr�d�ric Giudicelli 
<[EMAIL PROTECTED]> said:

groups> Hi,
groups> I would like to implement some kind of error locking function:
groups> 
groups> SYSerr(x,x);
groups> ERR_disable(); //We don't want anymore error feedback from this point
groups> //call to functions that can potentialy generate some more errors
groups> ERR_enable(); //Re-enable error feedback

I'd like to suggest something different that could be used for the
same purpose:

ERR_mark()              Puts a mark in the error stack
ERR_pop_to_mark()       Pops off errors from the error stack until a
                        mark is found.  The mark itself is popped as
                        well.

The reason for this is that there may be situations where you might
want to add a mark, do something, then check for certain errors and
only remove the errors upto the mark if they appear.  Your example
would be fulfilled like this:

SYSerr(x,x);
ERR_mark(); //We don't want anymore error feedback from this point
//call to functions that can potentialy generate some more errors
ERR_pop_to_mark(); //Re-enable error feedback

The only difference is that this consumes a little more memory and
CPU, temporarly...

-- 
Richard Levitte   \ Tunnlandsv�gen 3  \ [EMAIL PROTECTED]
[EMAIL PROTECTED]  \ S-168 36  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to