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
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho