CArchiveException::m_cause

Specifies the cause of the exception.

int m_cause;

Remarks

This data member is a public variable of type int. Its values are defined by a CArchiveException enumerated type. The enumerators and their meanings are as follows:

  • CArchiveException::none   No error occurred.

  • CArchiveException::genericException   Unspecified error.

  • CArchiveException::readOnly   Tried to write into an archive opened for loading.

  • CArchiveException::endOfFile   Reached end of file while reading an object.

  • CArchiveException::writeOnly   Tried to read from an archive opened for storing.

  • CArchiveException::badIndex   Invalid file format.

  • CArchiveException::badClass   Tried to read an object into an object of the wrong type.

  • CArchiveException::badSchema   Tried to read an object with a different version of the class.

    备注

    These CArchiveException cause enumerators are distinct from the CFileException cause enumerators.

    备注

    CArchiveException::generic is deprecated. Use genericException instead. If generic is used in an application and built with /clr, there will be syntax errors that are not easy to decipher.

Requirements

Header: afx.h

See Also

Reference

CArchiveException Class

Hierarchy Chart

Other Resources

CArchiveException Members