Actions on API Errors

NI Spy

Actions on API Errors

NI Spy includes several options for capturing API errors. To access these options, select Spy»Options and select the Error Action tab.

Action to Take on API Error

Select Continue capturing and ignore error to continue capturing when an API error occurs. Select Stop capturing to capture the error and then stop capturing. Select Pause and display a dialog to capture the error, pause capturing, and display a dialog. The dialog gives you the option of continuing or stopping the capture.

When to Take Action

If you select Stop capturing or Pause and display a dialog, select Immediately to stop capturing immediately after the API error or select Specific number of calls after error to stop capturing after a specified number of calls.

Limit Error Criteria

If you select Stop capturing or Pause and display a dialog, you have several options for limiting the error criteria.

Select Any API to stop capturing after errors in all APIs. Select Specific API and choose the API from the drop-down list to stop capturing only after errors in the specified API.

If you select Specific API, select Any function to stop capturing after all errors, or select Specific function and enter the function name to stop capturing after the specified function. (The function name is case sensitive.)

Select Any error code to stop capturing after any API error. Select Specific error code and enter the error code to stop capturing after the specified error code. You can enter this number in either decimal format (for example, 6) or hexadecimal format (for example, 0xBFFF0015). For NI-488 users, you can enter either an ibsta or iberr value.