From 83dcba128b20f319f1b51e3df7335aa6c9aa20df Mon Sep 17 00:00:00 2001 From: PeiYong Zhang <peiyongz@apache.org> Date: Mon, 15 Jul 2002 21:54:06 +0000 Subject: [PATCH] CouldNotWriteToFile git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174008 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp | 3 +-- src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp | 6 ++++-- src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp | 6 ++++-- src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp | 6 ++---- src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp | 3 +-- src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp | 3 +-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp b/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp index 3d03699df..b579c2447 100644 --- a/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp @@ -299,8 +299,7 @@ XMLPlatformUtils::writeBufferToFile( FileHandle const theFile if(ferror((FILE*)theFile)) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } if (bytesWritten < toWrite) //incomplete write diff --git a/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp b/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp index bc0c8f4aa..60c10fa36 100644 --- a/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/HPUX/HPPlatformUtils.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.6 2002/07/15 21:52:48 peiyongz + * CouldNotWriteToFile + * * Revision 1.5 2002/06/24 15:55:03 peiyongz * Change from James Berry( jberry@criticalpath.com) * @@ -416,8 +419,7 @@ XMLPlatformUtils::writeBufferToFile( FileHandle const theFile if(ferror((FILE*)theFile)) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } if (bytesWritten < toWrite) //incomplete write diff --git a/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp b/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp index 4933a383c..b5f71fe06 100644 --- a/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/Linux/LinuxPlatformUtils.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.6 2002/07/15 21:53:04 peiyongz + * CouldNotWriteToFile + * * Revision 1.5 2002/06/24 15:55:21 peiyongz * Change from James Berry( jberry@criticalpath.com) * @@ -414,8 +417,7 @@ XMLPlatformUtils::writeBufferToFile( FileHandle const theFile if(ferror((FILE*)theFile)) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } if (bytesWritten < toWrite) //incomplete write diff --git a/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp b/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp index 90e49d931..43333f85f 100644 --- a/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp @@ -456,8 +456,7 @@ XMLMacFile::write(const long byteCount, const XMLByte* const buffer) if (!mFileValid) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } if (gHasHFSPlusAPIs) @@ -475,8 +474,7 @@ XMLMacFile::write(const long byteCount, const XMLByte* const buffer) if ((err != noErr && err != eofErr) || (bytesWritten != byteCount)) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } } diff --git a/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp b/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp index dd62b327a..79dbc59c7 100644 --- a/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp +++ b/src/xercesc/util/Platforms/Solaris/SolarisPlatformUtils.cpp @@ -318,8 +318,7 @@ XMLPlatformUtils::writeBufferToFile( FileHandle const theFile if(ferror((FILE*)theFile)) { - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); } if (bytesWritten < toWrite) //incomplete write diff --git a/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp b/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp index 095cea039..6e1b5f37c 100644 --- a/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp +++ b/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp @@ -526,8 +526,7 @@ XMLPlatformUtils::writeBufferToFile( FileHandle const theFile while (true) { if (!::WriteFile(theFile, tmpFlush, toWrite, &bytesWritten, 0)) - ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotReadFromFile); - //ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); + ThrowXML(XMLPlatformUtilsException, XMLExcepts::File_CouldNotWriteToFile); if (bytesWritten < (unsigned long) toWrite) //incomplete write { -- GitLab