I am using the Function ConnectToTCPServer library . This feature is disabled when the host is unavailable. In this case, the application crashes with the following error: "Non-FATAL RUN-TIME error:" MyClient.c ", line 93, column 15, flow identifier 0x000017F0: library function error (returned value == -11 [0xfffffff5]) "Timeout error"
Error code 11 is a timeout error, so this can happen quite often in my application - however the application crashes - I would like to catch this error, not the application crashing.
How can I catch this runtime error in Ansi C90?
EDIT: The following is the code for the current usage:
ConnectToTCPServer(&srvHandle, srvPort, srvName, HPMClientCb, answer, timeout);
with
int HPMClientCb(UINT handle, int xType, int errCode, void *transData){
printf("This was never printed\n");
return errCode;
}
callback . , ConnectToTCPServer . , , .
EDIT 2: Callback , Returnvalue ConnectToTCPServer . , , ConnectToTCPServer . C90. ?
EDIT 3: , , , - , - , .