LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

sppression of NON-FATAL RUN-TIME ERRORS

It is useful to the NI-DAQ function WFM_Check() to see if there is a transfer currently in progress. It is also convenient to work in debug mode. Unfortunately, when CVI is in debug mode and WFM_Check() is called and the result is noTransferInProgError, execution is paused and a NON-FATAL RUN-TIME ERROR dialogue appears. I would perfer that the function simply provide a return value corresponding to this condition and not pause execution. Is there a way to tell CVI in debug mode to suppress all NON-FATAL error notificatoin or better still to change the way that it responds on a function by function basis? Thank you.

Joe Briton
0 Kudos
Message 1 of 2
(2,803 Views)
You need to be careful ignoring all non-fatal runtime errors. Those error dialog boxes can be a big help in debugging unexpected conditions. But for functions whose error you expect and are ready to handle, do something like this.

int bPrevBreak;
// don't break on errors, but save previous state
bPrevBreak = SetBreakOnLibraryErrors (FALSE);
...
// functions whose errors you'll handle in code
...
// restore previous state of break-on-errors
SetBreakOnLibraryErrors (bPrevBreak);
0 Kudos
Message 2 of 2
(2,803 Views)