选择错误下拉列表箭头,可打开该对话框。

使用该对话框选择内置错误代码创建自定义错误消息

该对话框包含以下部分:

选项 说明信息
错误代码范围

Displays a list of error code categories.

您还可以 创建自己的 错误 类别
滤波器

Specifies the keyword to search for within the specified error code range. Use this option to narrow down the list of error codes to display in the Error Listing table. This option is not available if you select Custom Error Code from the Error Code Range drop-down listbox.

错误列表

Displays the errors available in the specified error code range. You can scroll through the list to find the error code or you can type the error code number and the listbox scrolls down to that entry. You can narrow down the list of error codes to display using the Filter textbox.

错误代码

Appears when you select Custom Error Code from the Error Code Range drop-down listbox.

  • -8999 - -8000, 5000 - 9999, 500,000 - 599,999是预留的自定义错误代码范围。要自定义一个错误代码,可使用在上述范围中的错误代码值。
  • 输入现有错误代码,可重写现有错误代码消息。如要在常见错误实例中返回特定的错误消息,可为已定义的错误代码创建自定义错误消息。例如,在错误代码7:文件未找到的基础上添加具体的文件名称,指明特定的文件。
错误说明(可选)

Appears when you select Custom Error Code from the Error Code Range drop-down listbox. Enter the description of the error. This field accepts the same % codes as the Format Into String function. Use the % codes to customize the error description.

(实时模块)自定义错误字符串会在实时应用程序中产生抖动。如要在代码中生成错误,以保证较好的确定性,建议将字符串留空。
错误或警告

Specifies if the selected error code is handled as an error or a warning.

包含调用链

Includes in the error description the chain of callers from the current VI to the top-level VI, which is useful when determining where in the VI hierarchy the error occurred.

(实时模块)排除呼叫链,减少实时应用中的抖动。