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.
class CFileException
CException                                  Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Description
 
  A CFileException object represents a file-related exception condition.
  The CFileException class includes public data members that hold the
  portable cause code and the operating-system-specific error number. The
  class also provides static member functions for throwing file exceptions
  and for returning cause codes for both operating-system errors and C
  run-time errors.
 
  #include <afx.h>
 
  See Also
 
  CFile, Chapter 5, "Exception Processing"
 
  Comments
 
  CFileException objects are constructed and thrown in CFile member
  functions and in member functions of derived classes. You can access
  these objects within the scope of a CATCH expression. For portability,
  use only the cause code to get the reason for an exception.
 
  Public Members
 
  Data Members
 
  m_cause      Contains portable code corresponding to the exception
                 cause.
 
  m_lOsError   Contains the related operating-system error number.
 
  Construction/Destruction
 
  CFileException   Constructs a CFileException object.
 
  Code Conversion
 
  OsErrorToException   Returns a cause code corresponding to an MS-DOS
                         error code.
 
  ErrnoToException     Returns cause code corresponding to a run-time
                         error number.
 
  Helper Functions
 
  ThrowOsError   Throws a file exception based on an operating-system
                   error number.
 
  ThrowErrno     Throws a file exception based on a run-time error
                   number.
 
 
                                     -♦-