PwrErroris currently a very basic error reporting utility. In the future it will become a full-fledged error handling facility that uses some of the C++ 3.0 AT&T release features for error handling. Currently,
PwrErrordefines a macro called
PwrAssert, which reports XVT-Power++ errors.
PwrAssertto verify that a certain condition is true. For example, you can call it as follows:
...If the condition
aCircle = new CCircle();
PwrAssert(aCircle != NULL, 1234, "Failed to create"
(aCircle!=NULL)is false, a fatal note pops up indicating the error number (1234) as well as the file and line number of the error.
The message ("
Failed ...") is simply a comment by
PwrAssert; it is not used and does not take up memory.
PWRNoErroroption suppresses all assertions. Even the testing of the condition is suppressed, so be careful to ensure that your program does not depend on any side effects that are a product of evaluating the condition.
PWRErrorto handle errors as needed.