peiyongz 2003/12/16 16:02:41 Modified: c/tests/XSerializerTest XSerializerTest.cpp Log: Always display Serialization/Deserialization error Revision Changes Path 1.6 +9 -12 xml-xerces/c/tests/XSerializerTest/XSerializerTest.cpp Index: XSerializerTest.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/tests/XSerializerTest/XSerializerTest.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XSerializerTest.cpp 16 Dec 2003 22:59:39 -0000 1.5 +++ XSerializerTest.cpp 17 Dec 2003 00:02:41 -0000 1.6 @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ +* Revision 1.6 2003/12/17 00:02:41 peiyongz +* Always display Serialization/Deserialization error +* * Revision 1.5 2003/12/16 22:59:39 peiyongz * compilation error fix * @@ -103,7 +106,6 @@ static bool errorOccurred = false; static bool recognizeNEL = false; -static bool showSerializationError = false; static char localeStr[64]; // --------------------------------------------------------------------------- @@ -211,7 +213,7 @@ //make it to refer to the binary data saved in the myOut //but the data still belong to myOut myIn = new BinMemInputStream( ((BinMemOutputStream*)myOut)->getRawBuffer() - , BufSize + , ((BinMemOutputStream*)myOut)->getSize() , BinMemInputStream::BufOpt_Reference ); return myIn; @@ -294,11 +296,9 @@ catch(const XSerializationException& e) { //do emit error here so that we know serialization failure - if (showSerializationError) - { - XERCES_STD_QUALIFIER cerr << "An error occurred during serialization\n Message: " - << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; - } + XERCES_STD_QUALIFIER cerr << "An error occurred during serialization\n Message: " + << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; + retVal = false; } @@ -317,11 +317,8 @@ } catch(const XSerializationException& e) { - if (showSerializationError) - { - XERCES_STD_QUALIFIER cerr << "An error occurred during de-serialization\n Message: " + XERCES_STD_QUALIFIER cerr << "An error occurred during de-serialization\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl; - } destroyParser(); retVal = false;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]