Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CArchiveException::m_cause
CArchiveException                           Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Syntax
 
  int m_cause;
 
  Remarks
 
  Specifies the cause of the exception. Its values are defined by a
  CArchiveException enumerated type. The enumerators are:
 
  Value                          Meaning
 
  CArchiveException::none        No error occurred.
 
  CArchiveException::generic     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.
 
  NOTE: These CArchiveException cause enumerators are distinct from the
        CFileException cause enumerators.
 
  Example
 
  extern CFile f;
  TRY
  {
      CArchive ar( &f, CArchive::store );
  }
  CATCH( CArchiveException, e)
  {
      if( e->m_cause == CArchiveException::readOnly )
          printf( "ERROR: Archive is read-only\n" );
  }
  END_CATCH
 
 
 
                                     -♦-