|
|
Choosing A Webhost: |
RE: [Bulk] Re: ErrorsCallback ???: msg#00006text.xml.xmlsec
PostScript ... A call to the following works fine after any libxml2 function throwing an error. I tried it after a failed xmlsec function call and received nothing (i.e. Python None aka NULL) Ed errMsg = self.checkLibxml2Error() ... def checkLibxml2Error(self): libxml2 = self.env.libxml2 errMsg = None errorPtr = libxml2.xmlGetLastError() if errorPtr != 0: try: error = xmlError.from_address(errorPtr) # set up pointer to a libxml2 xmlError structure errMsg = 'level ' + str(error.level) + ' error in domain ' + str(error.domain) + ' code ' + str(error.code) + error.message, ' at line ' + str(error.line) except: errMsg = 'Fatal error in xmlGetLastError function' return errMsg -----Original Message----- From: Edward Shallow [mailto:ed.shallow@xxxxxxxxxx] Sent: January 5, 2006 11:02 PM To: 'Aleksey Sanin' Subject: RE: [Bulk] Re: [xmlsec] ErrorsCallback ??? Re 2, Yes that sounds good !!! I'll try the xmlGetLastError support for xmlsec as well. I am already using it for libxml2 parsing errors. Re 1, Yes I am using Python with the ctypes module to directly access libxml2 and xmlsec. I can set the breakpoint on Linux but my problem is mscrypto and on Windows I am using Igor's binaries. I have never compiled under Windows, don't have the patience or the software. I doubt there is a coding problem as everything is coming back for openssl and sometimes is coming back for mscrypto (Verify calls) Ed -----Original Message----- From: xmlsec-bounces@xxxxxxxxxxx [mailto:xmlsec-bounces@xxxxxxxxxxx] On Behalf Of Aleksey Sanin Sent: January 5, 2006 7:51 PM To: ed.shallow@xxxxxxxxxx Cc: xmlsec@xxxxxxxxxxx Subject: [Bulk] Re: [xmlsec] ErrorsCallback ??? 1) Are you using xmlsec directly or via python? If you have C/C++ app, simply set a breakpoint in the error callback and then trace it back to the error origin. You'll see the exact place where NULL shows up. 2) The default callback sets the reported error in to libxml2 thus you can use xmlGetLastError() directly. If you have a custom callback then you can do similar thing yourself. Aleksey _______________________________________________ xmlsec mailing list xmlsec@xxxxxxxxxxx http://www.aleksey.com/mailman/listinfo/xmlsec
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ErrorsCallback ???, Aleksey Sanin |
|---|---|
| Next by Date: | Re: [Bulk] Re: ErrorsCallback ???, Aleksey Sanin |
| Previous by Thread: | ErrorsCallback ???, Edward Shallow |
| Next by Thread: | Re: [Bulk] Re: ErrorsCallback ???, Aleksey Sanin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |