Synopsis
int CacheErrorW(CACHEWSTRP errmsg, CACHEWSTRP errsrc, int *offset)
Description
Returns the most recent error message, its associated source string, and the offset to where in the source string the error occurred.
Arguments
errmsg The error message or the address of a variable to receive the error message.
errsrc The source string for the error or the address of a variable to receive the source string the error message.
offset The offset to location in errsrc or the address of an integer to receive the offset to the source string the error message.
Return Values
CacheErrorW Return Values
CACHE_CONBROKEN Connection has been broken.
CACHE_NOCON No connection has been established.
CACHE_RETTOOSMALL The length of the return value for either errmsg or errsrc was not of the valid size.
CACHE_SUCCESS Connection formed.
Example
CACHEWSTRP errmsg;
CACHEWSTRP srcline;
int offset;
errmsg.len = 50;
srcline.len = 100;
if ((rc = CacheErrorW(&errmsg, &srcline, &offset)) != CACHE_SUCCESS)
printf("\r\nfailed to display error - rc = %d",rc);