Export to XML Exceptions thrown
Posted: Wed Apr 06, 2005 1:10 pm
I am exporting a data file as XML uisng
HRESULT hr = m_Graph->Export->asXML->SaveToFile(FullPathAndFilename);
This is protected inside a Try / Catch block to prevent exceptions being propogated outwards.
The problem is that should the save fail for reasons such as Disc full, Disc write protected, Access Denied etc the only exception I get passed back is
E_UNEXPECTED
This doesnt give me enough detail as to why the save failed, I was wondering if there was a way to recover the reason the save failed.
The only steema example I have found for VC just deletes the exception if its thrown without attempting to analyse it.
HRESULT hr = m_Graph->Export->asXML->SaveToFile(FullPathAndFilename);
This is protected inside a Try / Catch block to prevent exceptions being propogated outwards.
The problem is that should the save fail for reasons such as Disc full, Disc write protected, Access Denied etc the only exception I get passed back is
E_UNEXPECTED
This doesnt give me enough detail as to why the save failed, I was wondering if there was a way to recover the reason the save failed.
The only steema example I have found for VC just deletes the exception if its thrown without attempting to analyse it.