[Home] [Prev] [Next] [Up]


XPostError class

Default error reporting class used by YAAF.

Usage:

#include <XError.h>

class XPostError;

Description

This class provides a mechanism for reporting an error.

Construction/Destruction Methods

XPostError::XPostError(char *msg,...)

This constructor builds the error message to display using the DisplayError method.

The 'msg' string can have special escapes to insert arguments. Those string escapes are '^S' to insert a string, and ^D to insert a long integer.

For example:

throw XPostError("Error ID: ^D at ^S",(long)id,__FILE__);

will present the error:

"Error ID: 3343 at myfile.cpp"

XPostError::~XPostError()

Default destructor does nothing but serves as a placeholder.

Error reporting

void XPostError::DisplayError(void)

This method displays the error string constructed by the XPostError constructor.


[Home] [Prev] [Next] [Up]