I use a try catch to capture the exception of my flowchart, but how can I locate the error activity when error was caught? Any solutions for this? thanks
Exception.Message gives you the Message of the Exception
Exception.Source gives you activity where exception happened
I tried the solution you given, but actually it did not show the display name of activity, just “UiPath.Core.Activities” given. any suggestion for this ? thanks.
Dominic, as you seen on the screen shot. actually the second activity will lead to error because I did not give a correct selector, but the debug result do not show its display name at all.
Dominic, I think this is not so a good design, base on this, I have to create at least two workflows, even I just want to create a very simple robot. Many thanks for your comments.
if you get exception in try block you cant get the activity name, so use only on try catch block for entire project(in main/starting xaml alone use the try catch block)
In main/starting xaml alone use try catch block inside you call another xaml file invoke other xaml file.(so the entire project only one try catch block need to use so only you can get the activity name.
Exception Handling example
@rudy, you needn’t to use two workflows. Point here is If you use Try catch with Invoke Workflow activity then you can catch the activity name with exception.Source
Hi Arivu, now I have a project which have to download information from multiple business systems. For each system, I want to create a xaml file so that I can get the result via out-arguments, and if failed in downloading, the robot need to write the running log. but exception may be given from any xaml files, if I want the robot to write the log correctly, it is difficult to get all the exception data from main xaml file.