エラー メッセージ
成功時に SUCCESSFUL_RETURN または 0 (ゼロ) の値を返す関数もあります。成功しなかった場合、関数はエラー コードを返します。エラー メッセージを取得するには、getErrorMessage(int errorCode) を呼び出します。例:
Server *server = NULL;
int nRet;
//Create Server
server = createServer();
//set the property to the server
...
//Connect to server
printf("Making connection to the server...\n");
nRet = serverConnect(server);
if(nRet != SUCCESSFUL_RETURN)
{
// ASCII Version-use the following code
printf(getErrorMessage(nRet));
//Unicode Version -use the following code
UChar * error = getErrorMessage(nRet));
// more code to print out the error messageÂ….
return ;
}
C API では、次のエラー メッセージが使用されます。
- NULL 構造体渡しのエラー メッセージ:
- "Input null DataRow"
- "Input null DataTable"
- "Input null Message"
- "Input null Server"
- 接続エラー メッセージ:
- "Connection type not supported"
- "Client timeout"
- "Blank connection property name"
- "Blank property name"
- DataTable 作成時のエラー メッセージ:
- "Blank column name"
- "Duplicated column name"
- 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"