[Classes] [Prev] [Next] [Methods]

PwrError

Heritage
Description
Usage
Overrides

PwrError


Heritage

Superclass: None

Subclasses: None


Description

PwrError is 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, PwrError defines a macro called PwrAssert, which reports XVT-Power++ errors.


Usage

Use PwrAssert to verify that a certain condition is true. For example, you can call it as follows:

...
aCircle = new CCircle();
PwrAssert(aCircle != NULL, 1234, "Failed to create"
"circle");
...
If the condition (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.

Compiling with PWRNoError option 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.


Overrides

Override the contents of PWRError to handle errors as needed.



[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.