Hi Mark,

Thanks, I just created a similar patch!

Dave



                                                                                       
                                                             
                      "Mark Weaver"                                                    
                                                             
                      <[EMAIL PROTECTED]         To:      <[EMAIL PROTECTED]>          
                                                        
                      >                        cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                                        
                                               Subject: RE: 
XalanTransformer::transform fails in Xalan 1.5                                         
 
                      09/03/2003 10:51                                                 
                                                             
                      AM                                                               
                                                             
                      Please respond                                                   
                                                             
                      to xalan-dev                                                     
                                                             
                                                                                       
                                                             




> The exception is actually returning the value of errno, which ought to
> contain the appropriate error code.  This may be a case where we need
some
> Windows-specific call to get an error code.
>

Confirmed, this class is using the Win32 file API (CreateFile, etc) and
throwing an exception based on errno, rather than GetLastError().
XalanFileOutputStream.cpp #154:

#if defined(WIN32)
    if (m_handle == INVALID_HANDLE_VALUE)
#else
    if (m_handle == 0)
#endif
             {
                         throw XalanFileOutputStreamOpenException(
                                                             theFileName,
                                                             errno);
             }

I've attached a patch against CVS to correct the problem.  In other places
in the same class, this appears to be correctly implemented.


Reply via email to