[xmlsec] xmlsec errors reporting

Aleksey Sanin aleksey at aleksey.com
Fri Aug 16 07:54:28 PDT 2002


Hi, Devin!

I am not sure that this is still interesting for you but recently I've 
upgraded
XML Sec library reporting system and now it stores detailed error codes
in the OpenSSL errors stack so you can find out what exactly happened
and where. Also you can plugin your custom error handler and do everything
yourself. The new version is available in the daily snapshot tarballs.


Aleksey Sanin



dheitmueller wrote:

>However, it may be worthwhile to rethink how the xmlsec library's return status codes work.  
>
>It looks like a large number of the functions simply return zero or -1, which makes it quite difficult to do proper exception handling in conditions where there are multiple exit points for the function call (unless you have a debug binary, of course).  Either way, the exception cannot be handled programatically (such as showing more user-friendly failure messages).
>
>Would you be willing to accept a patch that provides more detailed status codes as return values?  We would substitute all the "-1" return values with more detailed error codes (which would be #defined and centralized into a single file).  We would also need to modify any example code which checks for (return < 0) to check for nonzero returns instead.  
>
>Of course, there are still functions in which the return value is not a status code.  For the time being these will stay the same.  However in the long term, perhaps it would be more uniform for all the library calls to use the same calling convention (returning a status code), which would require us to move the context presently used as the return value into an argument for all the relevant functions.
>
>  
>





More information about the xmlsec mailing list