niDCPower_ClearError
ViStatus niDCPower_ClearError(ViSession vi)
Purpose
Clears the error code and error description for the IVI session. If the user specifies a valid IVI session for vi, this function clears the error information for the session. If the user passes VI_NULL for vi, this function clears the error information for the current execution thread. If the ViSession parameter is an invalid session, the function does nothing and returns an error.
The function clears the error code by setting it to VI_SUCCESS. If the error description string is non-NULL, the function de-allocates the error description string and sets the address to VI_NULL.
Maintaining the error information separately for each thread is useful if the user does not have a session handle to pass to the niDCPower_GetError function, which occurs when a call to niDCPower_init or niDCPower_InitWithOptions fails.
Parameters
Input | ||
Name | Type | Description |
vi | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_init or niDCPower_InitWithOptions function. |
Return Value
Name | Type | Description |
Status | ViStatus | Reports the status of this operation. To obtain a text description of the status code, call the niDCPower_error_message function. To obtain additional information concerning the error condition, call the niDCPower_GetError function. |