こんにちは。UiPath Studio EnterPrise版23.4.2ユーザの初心者です。



New System.Exception("message")


Hi @gorby

No, you cannot set an Int32 value to a System.Exception variable. A System.Exception variable is a reference type, which means that it is a pointer to a location in memory where the actual object data is stored. Int32 is a value type, which means that it is a simple value that is stored directly in memory.

To set a System.Exception variable to a non-null value, you need to create a new System.Exception object and assign it to the variable. For example:

System.Exception myException = new System.Exception("This is an exception");

Once you have created a new System.Exception object, you can assign it to the variable in the Variables panel.

Here is an example of how you would do this:

  1. Open the Variables panel.
  2. Click on the System.Exception variable.
  3. In the Value field, type the following:

new System.Exception("This is an exception")

  1. Press F5 to start debugging your workflow.

When you press F5, your workflow will be paused at the first breakpoint. At this point, the System.Exception variable will be set to the new System.Exception object that you created.

Hope it helps!!