cwbSV_GetErrClassIndexed
Use the cwbSV_GetErrClassIndexed API with this product.
Purpose
Returns the message class associated with the error index provided. An index value of 1 will retrieve the lowest-level (for example, the oldest) message that is associated with the error handle. An index value of "cwbSV_GetErrCount()'s returned errorCount" will retrieve the top-level (for example, the most recent) message associated with the error handle.
Syntax
unsigned int CWB_ENTRY cwbSV_GetErrClassIndexed(
cwbSV_ErrHandle errorHandle,
unsigned long errorIndex,
unsigned long *errorClass);
Parameters
- cwbSV_ErrHandle errorHandle - input
- Handle that was returned by a previous call to the cwbSV_CreateErrHandle() function.
- unsigned long errorIndex - input
- Index value that indicates which error text to return if multiple errors are associated with the error handle.
- unsigned long * errorClass - output
- Pointer to a variable that will receive the error class that is stored in the error that is identified by the index.
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWB_INVALID_POINTER
- NULL passed on output parameter.
- CWB_INVALID_HANDLE
- Handle is not valid.
- CWBSV_NO_ERROR_MESSAGES
- No error messages associated with error handle.
Usage
Valid index values are from 1 to cwbSV_GetErrCount()'s return value. Index values less than 1 act as if 1 was passed. Index values greater than cwbSV_GetErrCount() act as if errorCount was passed.