Error Messages

In order to get error messages, use the Exception class. Use the try/catch constructs to capture the error message. For example:

try{ 
		Server *server=new Server(); 
		
		//Connect to server 
		server->connect(); 
		
		}catch(Exception e) 
		{ 
		 // ASCII Version-use the following code 
		cout << "Error Occurs," << e.getErrorMessage(); 
		//Unicode Version -use the following code 
		
		UnicodeString error = e.getErrorMessage() ; 
			
		wcout << error.getTerminatedBuffer(); 
		}

The C++ API uses the following error messages:

  • Error Messages for Connection:
    • "Connection type not supported"
    • "Client timeout"
    • "Blank connection property name"
    • "Blank property name"
  • Error Messages for creating DataTable:
    • "Blank column name"
    • "Duplicated column name"
    • "The column index is invalid"
  • Error Messages for MessagePackaging Exception:
    • "Input Message is null"
    • "Failed to connect to Server"
    • "Failed to disconnect from Server"
    • "Failed to open Http Connection"
    • "Failed to get Service"
    • "Failed to package the message using Serializer and Encoding"