ObjectWindows provides a number of classes that can be thrown as exceptions.
Based on the TXBase and TXOwl classes, these exception classes can inform the user of the existing exceptional state, prompt the user for a course of action, create new exception objects, throw exceptions, and so on.
There are four exception classes that are implemented as independent classes:
- TXBase is the base class for all ObjectWindows and exception classes. It is derived from the xmsg class.
- TXOwl, derived from TXBase, is the base class for the ObjectWindows exception classes.
- TXCompatibility describes exceptions that occur when TModule::Status has a non-zero value, providing backwards compatibility between the ObjectWindows 1.0 method of detecting exceptional situations and the ObjectWindows 2.x exception hierarchy. TXCompatibility maps the value of TModule::Status to a resource string identifier.
- TXOutOfMemory describes an exception that occurs when an attempt to allocate memory space for an object fails. This is analogous to the xalloc object thrown when new fails to properly allocate memory.
- TXBadFormat, derived from TXBase, describes an exception that occurs when an an illegal file format is encountered.
- Two other classes, TXOle and TXAuto, are derived from TXBase. These classes provide exception handling for the classes.