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 CException
◄CObject►                                     ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Description
 
  CException is the base class for all exceptions in the Microsoft
  Foundation Class Library. The derived classes are listed below:
 
  Class                      Description
 
  ◄CMemoryException►         Out-of-memory exception
 
  ◄CNotSupportedException►   Request for an unsupported operation
 
  ◄CArchiveException►        Archive-specific exceptions
 
  ◄CFileException►           File-specific exceptions
 
  ◄CResourceException►       Windows resource not found or not creatable
 
  These exceptions are intended to be used with the ◄THROW►, ◄THROW_LAST►,
  ◄TRY►, ◄CATCH►, ◄AND_CATCH►, and ◄END_CATCH► macros. For more
  information on exception handling, see the section in Chapter 2,
  "Exception Handling," and for more information on exception processing,
  see Chapter 5, "◄Exception Processing►," of the <Class Libraries
  Reference>. Also see the cookbook in the <Class Libraries User's
  Guide>.
 
  #include <afx.h>
 
  Comments
 
  Use the derived classes to catch specific exceptions. Use CException if
  you need to catch all types of exceptions (and then use
  CObject::IsKindOf to differentiate among CException-derived classes.)
  All derived CException classes use the IMPLEMENT_DYNAMIC macro.
 
  CException objects are deleted automatically. Do not delete them
  yourself.
 
  Derivation
 
  Because CException is an abstract base class, you cannot create
  CException objects; you must create objects of derived classes. If you
  need to create your own CException type, use one of the derived classes
  listed above as a model.
 
                                     -♦-