You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2005/12/14 09:11:46 UTC

[jira] Resolved: (XERCESC-1537) Xerces throws SAXParseException occasionally but the exception message is not helpful.

     [ http://issues.apache.org/jira/browse/XERCESC-1537?page=all ]
     
Alberto Massari resolved XERCESC-1537:
--------------------------------------

    Resolution: Invalid

Hi Chris,
the content of the message let me think you are doing something like std::cerr << e.getMessage();
But getMessage returns a XMLCh* (i.e. unsigned short*) so the << operator that is going to be picked is the generic operator <<(void*) that displays the pointer as an hexadecimal string. You should write 

char* msg=XMLString::transcode(e.getMessage());
std::cerr << msg;
XMLString::release(&msg);



> Xerces throws SAXParseException occasionally but the exception message is not helpful.
> --------------------------------------------------------------------------------------
>
>          Key: XERCESC-1537
>          URL: http://issues.apache.org/jira/browse/XERCESC-1537
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Windows 2000.
>     Reporter: Chris

>
> Using the following code to parse the same  XML again and again. works fine 99% of times, but occassionaly  SAXParseException  is thrown. SAXParseException .getMessage() returns "00662780",
> getLineNumber() returns 0.  getColumnNumber returns 0.
> 			XercesDOMParser parser;
> 			XmlErrorHandler errorHandler;
> 			parser.setErrorHandler(&errorHandler);
> 			parser.setDoNamespaces(true);
> 			parser.setIncludeIgnorableWhitespace(false);
> 			parser.parse(input_fname.c_str());
> Looks like a bug in Xerces but the exception message is totally useless for me,  any one who has detail knowledge may know what the message means. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org