Class: | DimErrorHandler | |
---|---|---|
Library: | DIM | |
Author: | C. Gaspar | |
Version: | v1.0 | Update :Thu Feb 11 15:52:46 1999 |
Utility Class - Implements an Error Handler for DIM
Servers and Clients
If the user declares
an errorHandler the method errorHandler is called when an error is detected
otherwise an error message is printed on stdout.
Public Functions :
Example (for a server):
class ErrorHandler : public
DimErrorHandler
{
void
errorHandler(int severity, int code, char *msg)
{
cout << severity << " " << msg << endl;
}
public:
ErrorHandler() {DimServer::addErrorHandler(this);}
};
Or (for a client):
class ErrorHandler : public
DimErrorHandler
{
void
errorHandler(int severity, int code, char *msg)
{
cout << severity << " " << msg << endl;
}
public:
ErrorHandler() {DimClient::addErrorHandler(this);}
};