Throwing an exception

To throw an exception in the CommonPoint application system, declare the exception object and use the C++ keyword throw:

    throw(TMyException exception(error value));
If an exception object has been allocated on a heap (using the new operator), you can ensure that it will be deleted after it is thrown by using the exception object's ThrowAndDelete() member function to throw the exception:

      TMyException exception(error value);
      exception.ThrowAndDelete();

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker