エラー メッセージ

エラー メッセージを取得するには、Exception クラスを使用します。 try/catch 構造を使用して、エラー メッセージをキャプチャします。 例:

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(); 
		}

C++ API では、次のエラー メッセージが使用されます。

  • 接続エラー メッセージ:
    • "Connection type not supported"
    • "Client timeout"
    • "Blank connection property name"
    • "Blank property name"
  • DataTable 作成時のエラー メッセージ:
    • "Blank column name"
    • "Duplicated column name"
    • "The column index is invalid"
  • MessagePackaging 例外のエラー メッセージ:
    • "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"