The following table lists the exception classes that are derived from IException and the situations in which they are typically thrown:
| Exception Class | Thrown When ... |
|---|---|
| IAccessError | A logical error occurs, such as "resource not found." |
| IAssertionFailure | The expression in an IASSERT macro evaluates to false. |
| IDeviceError | A hardware-related error occurs. |
| IInvalidParameter | An invalid parameter is passed; the expression in an IASSERTPARM macro evaluates to false. |
| IInvalidRequest | An object is in the wrong state for a function; the expression in an IASSERTSTATE macro evaluates to false. |
| IResourceExhausted | A resource is exhausted or currently unavailable. |
| IOutOfMemory | Memory is exhausted. |
| IOutOfSystemResource | System resource is exhausted. |
| IOutOfWindowResource | Window resource is exhausted. |
| IAlreadyExists | Requested object could not be created because an object with the same name or location already exists. |
| ICannotProceed | An operation could not be completed, but it may be possible to continue the operation or recover in some other fashion. |
| IInvalidName | Used an invalid name for an object (e.g. a file or network resource). |
| IMustBeEmpty | An operation on a container failed because the container was not empty. |
| IObjectNotFound | An operation failed because it was unable to locate the requested object. |
The following classes are used in conjunction with the IException class and its derived classes:
![]()
Using Throw Macros
Using Assertion Macros
Using try and catch
Rethrowing Exceptions
Deriving Your Own
Exceptions
Tracing Exceptions
![]()
The Exceptions
Mechanism
Using
Exceptions