GetErrorInfo Method - intrepidcs API
C/C++ declare
- Parameters - Return
Value - Remarks - C/C++ example
This method returns a text description of an intrepidcs API error number.
int
icsneoGetErrorInfo(int lErrorNumber,lErrorNumber
[in] This is the number of the error message returned from GetErrorMessages.
sErrorDescriptionShort
[out] This is short description of the error. This parameter
should be sized to include up to 255 characters including the NULL terminator.
sErrorDescriptionLong
[out] This is longer more detailed description of the error.
This parameter should be sized to include up to 255 characters including the
NULL terminator.
lMaxLengthShort
[in] This is the size in characters of the sErrorDescriptionShort
array that is being passed in. This value must be 255 or less.
lMaxLengthLong
[in] This is the size in characters of the sErrorDescriptionLong
array that is being passed in. This value must be 255 or less.
lErrorSeverity
[out] This indicates the error severity. This is estimated
severity for the application and doesn't have significant meaning. See Table 1
below for more information.
lRestartNeeded
[out] If 1 it is recommend that the application close
communications with the DLL and reopen it.
If the error number was found successfully the return value will be non-zero.
None.
Table 1 - Descriptions of Error Severity
Error Severity | Description |
const unsigned long icsspyErrCritical=0x10; | A critical error which affects operation or accuracy |
const unsigned long icsspyErrExclamation=0x30; | An important error which may be critical depending on the application. |
const unsigned long icsspyErrInformation=0x40; | An error which probably does not need attention. |
const unsigned long icsspyErrQuestion=0x20; | An error which is not understood. |
Example
C/C++ Example
lResult =
icsneoGetErrorMessages(hObject,iErrors, &lNumberOfErrors);
if(lResult ==
0)
printf("Problem
Reading errors");
// dump the neoVI
errors
if
(lNumberOfErrors > 0)
{
for
(lCount = 0; lCount < lNumberOfErrors; lCount++)
{
wprintf(szOut, "Error %d - ",
iErrors[lCount]);
icsneoGetErrorInfo(iErrors[lCount],szDescriptionShort,szDescriptionLong,
&lMaxLengthShort,&lMaxLengthLong,&lErrorSeverity,&lRestartNeeded);
printf("%s" szDescriptionShort);
printf("\n");
}
}
intrepidcs API Documentation - (C) Copyright 1997-2020 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Tuesday, October 05, 2010