peiyongz 2003/12/16 14:48:52 Modified: c/src/xercesc/util XMLDateTime.cpp Log: exception thrown upon invalid number, thanks Gareth Reakes. Revision Changes Path 1.18 +6 -2 xml-xerces/c/src/xercesc/util/XMLDateTime.cpp Index: XMLDateTime.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLDateTime.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- XMLDateTime.cpp 11 Dec 2003 21:38:12 -0000 1.17 +++ XMLDateTime.cpp 16 Dec 2003 22:48:52 -0000 1.18 @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.18 2003/12/16 22:48:52 peiyongz + * exception thrown upon invalid number, thanks Gareth Reakes. + * * Revision 1.17 2003/12/11 21:38:12 peiyongz * support for Canonical Representation for Datatype * @@ -132,6 +135,7 @@ #include <xercesc/util/XMLString.hpp> #include <xercesc/util/XMLUni.hpp> #include <xercesc/util/Janitor.hpp> +#include <xercesc/util/NumberFormatException.hpp> XERCES_CPP_NAMESPACE_BEGIN @@ -1405,7 +1409,7 @@ for (int i=start; i < end; i++) { if (fBuffer[i] < chDigit_0 || fBuffer[i] > chDigit_9) - break; + ThrowXML(NumberFormatException, XMLExcepts::XMLNUM_Inv_chars); retVal = (retVal * 10) + (unsigned int) (fBuffer[i] - chDigit_0); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]