Matthias,

It's taken me a while - but I have added this into the svn in preparation for the 1.3 release.

Thanks!

Cheers,
        Berin

Matthias Niggemeier wrote:

Hi there!
I would suggest the following change to xsecerror.hpp:

************************************************************

#define XSECnew(a, b) \
try \
{\
        if ((a = new b) == NULL) \
        { \
                throw XSECException (XSECException::MemoryAllocationFail); \
        } \
} \
    catch (XSECException &e) \
    {\
        throw XSECException (XSECException::InternalError, e.getMsg()); \
        }\
        catch (...) \
        { \
                throw XSECException (XSECException::MemoryAllocationFail); \
        }

************************************************************

(the new part is "catch (XSECException &e)")

I would suggest that to ensure that exceptions thrown in a constructor
(as e.g. in WinCAPICryptoProvider) can be properly handled. Without the
new catch, the error message generated in the constructor is thrown away.

Regards

Matthias



Reply via email to