CDocument::ReportSaveLoadException

virtual void ReportSaveLoadException( LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault );

Parameters

lpszPathName

Points to name of document that was being saved or loaded.

e

Points to the exception that was thrown. May be NULL.

bSaving

Flag indicating what operation was in progress; nonzero if the document was being saved, 0 if the document was being loaded.

nIDPDefault

Identifier of the error message to be displayed if the function does not specify a more specific one.

Remarks

Called if an exception is thrown (typically a CFileException or CArchiveException) while saving or loading the document. The default implementation examines the exception object and looks for an error message that specifically describes the cause. If a specific message is not found or if e is NULL, the general message specified by the nIDPDefault parameter is used. The function then displays a message box containing the error message. Override this function if you want to provide additional, customized failure messages. This is an advanced overridable.

CDocument OverviewClass MembersHierarchy Chart

See Also   CDocument::OnOpenDocument, CDocument::OnSaveDocument, CFileException, CArchiveException