Thanx Mark and David.
I will try with a small sample program with the corrected
Xalan1.5(XalanFileOutputStream.cpp) and get back to you.

-----Original Message-----
From: Mark Weaver [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 11:21 PM
To: [EMAIL PROTECTED]
Subject: RE: XalanTransformer::transform fails in Xalan 1.5



> 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