OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Like window objects, a dialog box object's Create and Execute member functions can throw the C++ exception TXWindow.
This exception is usually thrown when the dialog box cannot be created, typically because the specified resource does not exist or because of insufficient memory.
You can rely on the global exception handler that ObjectWindows installs when your application starts to catch TXWindow, or you can install your own exception handler. To install your own exception handler, place a try/catch block around the code you want to protect.
For example, if you want to know if your function DoStuff produces an error, the code would look something like this: