G'day,

My collegue wrote the following code, which fails silently when the file
being written to is read only. Should an exception be thrown? Is there
another error handling interface we should know about? Or is this a bug?

Thanks for your help. :-)

    XMLCh tempStr[nXMLStringLength];

    // construct a DOMWriter and serialize the user rights file
    CDPSXMLString::Transcode("LS", tempStr, nXMLStringLength-1);
    CReallySafePtr<DOMImplementation> pImpl
        = DOMImplementationRegistry ::getDOMImplementation(tempStr);
    CReallySafePtr<DOMWriter> pSerializer
        = ((DOMImplementationLS*)pImpl)->createDOMWriter();
    try
    {
        LocalFileFormatTarget out(m_strURFilePath.c_str());
        pSerializer->writeNode(&out, *m_pDOMDoc );
    }
    catch(...) //Couldn't find out what exception will throw from the doc.
so catch all here
    {
        // Error handling code goes here.
    }

==============================
Oliver White
Software Engineer
Product Development
Westinghouse Signals Australia
==============================


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to