ViStatus pi40iv_GetErrorInfo (ViSession instrumentHandle, ViPStatus primaryError, ViPStatus secondaryError, ViChar _VI_FAR errorElaboration[]);
This function returns the error information associated with an IVI session or with the current execution thread. If you specify a valid IVI session for the Instrument Handle parameter, this function retrieves and then clears the error information for the session. If you pass VI_NULL for the Instrument Handle parameter, this function retrieves and then clears the error information for the current execution thread.
The error information includes a primary error, secondary error, and an error elaboration string. For a particular session, this information is the same as the values held in the following attributes:
PI40IV_ATTR_PRIMARY_ERROR
PI40IV_ATTR_SECONDARY_ERROR
PI40IV_ATTR_ERROR_ELABORATION
The IVI Library also maintains this error information separately for each thread. This is useful if you do not have a session handle to pass to pi40iv_GetErrorInfo or pi40iv_ClearErrorInfo, which
occurs when a call to pi40iv_init or pi40iv_InitWithOptions fails.
You can call pi40iv_error_message to obtain a text description of the primary or secondary error value.
Input | ||
Name | Type | Description |
instrumentHandle | ViSession |
The ViSession handle that you obtain from the pi40iv_init or pi40iv_InitWithOptions function. The handle identifies a particular instrument session.
|
Output | ||
Name | Type | Description |
primaryError | ViStatus (passed by reference) |
The primary error code for the session or execution thread. The value is the same as the one held by the attribute PI40IV_ATTR_PRIMARY_ERROR.
|
secondaryError | ViStatus (passed by reference) |
The secondary error code for the session or execution thread. If the primary error code is non-zero, the secondary error code can further describe the error or warning condition. The value is the same as the one held by the attribute PI40IV_ATTR_SECONDARY_ERROR.
|
errorElaboration | ViChar[] |
The error elaboration string for the session or execution thread. If the primary error code is non-zero, the elaboration string can further describe the error or warning condition. The value is the same as the one held by the attribute PI40IV_ATTR_ERROR_ELABORATION.
|
Name | Type | Description |
status | ViStatus |
Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You examine the status code from each call to an instrument driver function to determine if an error occurred.
|
Error Info
Utility
Pickering Interfaces PXI/LXI IVI Switch
Alphabetical Function Index
Hierarchical Function Index