eth32_error_string

const char * eth32_error_string(int errorcode);

Summary

This function translates a numeric error code into a string which briefly describes the error. This function returns a pointer to the string stored in static memory. You must use caution to not modify or overwrite the contents of the string buffer. No connection to an ETH32 device is necessary to call this function. Therefore, this function does not take a handle as a parameter.

Parameters

  • errorcode - The numeric error code to translate into a string. Any error code returned by any API function may be passed for this parameter.

Return Value

This function returns a pointer to a string that describes the given error code. The string is stored in static memory.

Example
eth32 handle;
int result;
int value;

// .... Your code that establishes a connection here

// Attempt to read a port.  If it fails, print a 
// brief description of the error.
result=eth32_input_byte(handle, 1, &value);
if(result)
{
	printf("Failed to read port 1.  The error was: %s\n", eth32_error_string(result));
}
         
See Also

Error Handling Section