You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2003/09/17 21:20:40 UTC

cvs commit: xml-xalan/c/src/xalanc/PlatformSupport XalanFileOutputStream.cpp

dbertoni    2003/09/17 12:20:40

  Modified:    c/src/xalanc/PlatformSupport XalanFileOutputStream.cpp
  Log:
  Fixed bug where errorno was referenced instead of GetLastError().
  
  Revision  Changes    Path
  1.3       +12 -1     xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
  
  Index: XalanFileOutputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanFileOutputStream.cpp	15 Jul 2003 07:02:19 -0000	1.2
  +++ XalanFileOutputStream.cpp	17 Sep 2003 19:20:39 -0000	1.3
  @@ -59,7 +59,9 @@
   
   
   
  +#if !defined(WIN32)
   #include <cerrno>
  +#endif
   
   
   
  @@ -153,14 +155,19 @@
   {
   #if defined(WIN32)
       if (m_handle == INVALID_HANDLE_VALUE)
  +	{
  +		throw XalanFileOutputStreamOpenException(
  +					theFileName,
  +					GetLastError());
  +	}
   #else
       if (m_handle == 0)
  -#endif
   	{
   		throw XalanFileOutputStreamOpenException(
   					theFileName,
   					errno);
   	}
  +#endif
   }
   
   
  @@ -242,7 +249,11 @@
   
   	theResult += theFileName;
   
  +#if defined(WIN32)
  +	append(theResult, ".  The Windows error code is ");
  +#else
   	append(theResult, ".  The C++ run-time error code (errno) is ");
  +#endif
   
   	LongToDOMString(theErrorCode, theResult);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org