EMA C++ Developers Guide : 8 Troubleshooting and Debugging : 8.2 Omm Error Client Classes : 8.2.2 Example: Error Client
 
8.2.2 Example: Error Client
The following example illustrates an application error client and depicts simple processing of the onInvalidHandle() method. In the following example, ClassName is either OmmConsumerErrorClient (for Enterprise Message API consumer applications) or OmmProviderErrorClient (for Enterprise Message API provider applications).
 
 
class AppErrorClient : public ClassName
{
public :
 
void onInvalidHandle( UInt64 handle, const EmaString& text );
 
void onInaccessibleLogFile( const EmaString& filename, const EmaString& text );
 
void onMemoryExhaustion( const EmaString& text);
 
void onInvalidUsage( const EmaString& text, Int32 errorCode );
 
void onSystemError( Int64 code, void* ptr, const EmaString& text );
 
void onJsonConverter( const EmaString& text, Int32 errorCode, const ConsumerSessionInfo&
            sessionInfo );
};
 
void AppErrorclient::onInvalidHandle( UInt64 handle, const EmaString& text )
{
cout << "Handle = " << handle << endl << ", text = " << text <<endl;
}