Can I edit "User-defined error code" displayed on the error popup screen?

Updated Mar 28, 2024

Reported In

Software

  • TestStand

Issue Details

"User-defined error code" is displayed on the popup screen (Test Sequence Error) when an error occurs during TestStand sequence execution.

I would like to customize the "User-defined error code." to other error message.

How can I do this?
螢幕擷取畫面 2024-03-25 103931.png

Solution

Each TS step has a Result container that itself contains an Error container.

In that error container you have similar to the LabVIEW cluster, a numeric Code element, a string element Msg and a boolean Occurred.

If the boolean is true, TS will raise the error to the user with the Msg shown as the error description in the run-time error dialog and in the UUT resuts.

Ideally, the source that generates the error would set Msg accordingly but you can set or change this element as well.

For example if you have some expression that triggers an error, set Step.Result.Error.Msg to the error message you want to have displayed.
 

螢幕擷取畫面 2024-03-25 105335.png