beautypg.com

Daqseterrorhandler – Measurement Computing Data Acquisition Systems rev.10.4 User Manual

Page 278

background image


daqSetErrorHandler

Also See: daqSetDefaultErrorHandler,

daqDefaultErrorHandler,

daqGetLastError, daqProcessError

Format

vdaqSetErrorHandler (handle, handler)

Purpose

daqSetErrorHandler

specifies the routine to call when an error occurs in any function for the specified device.

Parameter Summary

Parameter Type

Description

handle DaqHandleT Handle to the device to which to attach the specified error

handler

handler DaqErrorHandlerFPT

Pointer to a user-defined error handler function

Parameter Values

handle:

obtained from the daqOpen function

handler:

a pointer to a user-defined function

Returns

DerrNoError

No error

Function Usage

The daqSetErrorHandler function specifies an error handler for the device currently open with the handle
parameter. It should be used if it is desirable to use a error handler other than the default error handler for a specific
device. This function allows the application to specify its own routine to be called when errors occur on processing
commands for the device. If it is desirable to have no action occur when a command error is detected on the device,
use this function with a null (0) parameter. The default error routine is daqDefaultErrorHandler.

For more details on error messages refer to the Daq Error Table.

Prototypes

C/C++

daqSetErrorHandler(DaqHandleT handle, DaqErrorHandlerFPT handler);

Visual BASIC

VBdaqSetErrorHandler&(ByVal handle&, ByVal handler&)

Program References

DAQADCEX05.CPP, DAQADCEX06.CPP, DAQEX.FRM (VB)

4.5-48 Daq API Command Reference

908794

Programmer’s

Manual