Mensajes de error
Algunas funciones arrojan un valor 0 (cero) o SUCCESSFUL_RETURN si se ejecutan con éxito. De lo contrario, la función arroja el correspondiente código de error. Para recuperar mensajes de error, invoque getErrorMessage(int errorCode). Por ejemplo:
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 ;
}
La API C utiliza los siguientes mensajes de error.
- Mensajes de error para estructura de transmisión nula:
- "Input null DataRow"
- "Input null DataTable"
- "Input null Message"
- "Input null Server"
- Mensajes de error para conexiones:
- "Connection type not supported"
- "Client timeout"
- "Blank connection property name"
- "Blank property name"
- Mensajes de error para la creación de tablas de datos:
- "Blank column name"
- "Duplicated column name"
- Mensajes de error para la excepción 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"