niDCPower_ClearError
- Updated2025-10-06
- 1 minute(s) read
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.
Syntax
ViStatus _VI_FUNC niDCPower_ClearError(ViSession vi)
Remarks
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_InitializeWithChannels fails.
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| vi | [in] | ViSession | Identifies a particular instrument session. vi is obtained from the niDCPower_InitializeWithIndependentChannels function. |
Returns
Reports the status of this operation. To obtain a text description of the status code, call niDCPower_error_message. To obtain additional information concerning the error condition, call niDCPower_GetError. The general meaning of the status code is as follows:
Value | Meaning |
|---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |