CArchive::Abort

void Abort ( );

Remarks

Call this function to close the archive without throwing an exception. The CArchive destructor will normally call Close, which will flush any data that has not been saved to the associated CFile object. This can cause exceptions.

When catching these exceptions, it is a good idea to use Abort, so that destructing the CArchive object doesn't cause further exceptions. When handling exceptions, CArchive::Abort will not throw an exception on failures because, unlike CArchive::Close, Abort ignores failures.

If you used new to allocate the CArchive object on the heap, then you must delete it after closing the file.

CArchive OverviewClass MembersHierarchy Chart

See Also   CArchive::Close, CFile::Close