Help needed in passing the arguments from Try to catch block

Hi UiPath,

I have a problem passing arguments to catch block whenever my workflow throws a system exception error in try.

For some reasons, whenever I tried to pass the variable, it always returns null values.

Hope someone can help me with this.

Please refer on this workflow for your reference

Sample Workflow Try Catch.xaml (6.4 KB)

Hey @alvin.c.apostol26

As I can see in your attached .xaml you have invoked a workflow in Try block and it have a out string argument as out_strTest

So, Whenever there will an error in that invoked workflow the out argument will be null and it is being stored in the out_strTest named variable means it will also be null…!

If you want to print the error in message box, then put exception.Message.ToString in Message box activity!

Screenshot for your reference:

Hope you got the solution!

Ajay Mishra

FYI you don’t need the .ToString because exception.Message is already string.

1 Like