TCore_Error
TCore_Error is the fundamental tornado error handling object. All errors other than not
enough memory are handled using this object - use the macro TCORE_ERROR_INSUFF to handle
the insufficient memory situation. If you provide an error handler, you should be careful
to trap the right errors and pass on the ones you don't want to trap (using throw). This
prevents errors getting "lost".
- Constructors:
- TCORE_ERROR_INSUFF (macro)
Used when an out-of-memory situation occurs
- TCORE_ERROR_LOC(TCore_Error e, TCore_String &str) (macro)
The standard error constructor. If an error situation comes up, simply do:
if(error)
{
TCORE_ERROR_LOC(e, "I have had a bad day");
throw e;
}
This will send the error "I have had a bad day" along with the location of
the thrower to the nearest error handler (if there is one). The literal string is
converted to a TCore_String as needed.
- TCORE_ERROR_LOCF(TCore_Error e, TCore_String &str) (macro)
Same as above, but is fatal
- Attributes:
- bool fatal
Indicates if the system thinks this error is fatal
- bool external
Indicates if this error actually came from the host operating system
- TCore_String message
A simple message representing the guts of the error
- Operators:
- =(const char *str)
Allows easy setting of the message attribute
- Methods:
- TCore_String retMessage()
Returns a full string representation of the contents of the error object.
(C) 1998 The Tornado II programming team (Last
updated: 15 March 2009 19:01:53 -0000)