Compartir a través de


Exception Classes

The class library provides an exception-handling mechanism based on class CException. The application framework uses exceptions in its code; you can also use them in yours. For more information, see the article Exceptions. You can derive your own exception types from CException.

MFC provides an exception class from which you can derive your own exception as well as exception classes for all of the exceptions it supports.

  • CException
    The base class for exceptions.

  • CArchiveException
    An archive exception.

  • CDaoException
    An exception resulting from a failure in a DAO database operation.

  • CDBException
    An exception resulting from a failure in ODBC database processing.

  • CFileException
    A file-oriented exception.

  • CMemoryException
    An out-of-memory exception.

  • CNotSupportedException
    An exception resulting from using an unsupported feature.

  • COleException
    An exception resulting from a failure in OLE processing. This class is used by both containers and servers.

  • COleDispatchException
    An exception resulting from an error during automation. Automation exceptions are thrown by automation servers and caught by automation clients.

  • CResourceException
    An exception resulting from a failure to load a Windows resource.

  • CUserException
    An exception used to stop a user-initiated operation. Typically, the user has been notified of the problem before this exception is thrown.

See Also

Concepts

Class Library Overview