niTuner_errorHandler

NI Tuner

niTuner_errorHandler

Function Prototype

int niTuner_errorHandler (int taskID, int errorCode, char errorSource[], char errorDescription[]);

Purpose

This function converts a returned error code into a text description of the error.

Note  0 may be passed as the taskID. This is useful to interpret errors after niTuner_init has failed or if errorSource is NULL. The taskID is required for cases in which errorSource is desired.

Parameters

Name Type Description
taskID int

The Task ID obtained from niTuner_init that identifies the session of a particular device.

errorCode int

Passes the error code returned from any of the instrument driver functions.

errorSource char[]

Returns the name of the function call where the error occurred.

Pass a char array at least MAX_FUNCTION_NAME_SIZE bytes in length, or pass NULL.

errorDescription char[]

Returns a text description of the error.

Pass a char array at least MAX_ERROR_DESCRIPTION bytes in length, or pass NULL.

Return Value

Returns the status of the function. To see an explanation of common error and warning codes, see Error and Status Codes.