The reason for "faulted"

Usually “faulted” is the statement of an error and then I started looking at the activity to look for which went wrong and was missing. But it is quite inconvenient. Is there a way to see what specific element/part went wrong in UiPath? Or should I keep guessing and doing trial and errors repeatedly until getting the error fixed?

1 Like

Faulted statement usually can be found in three places
—in log
—in orchestrator robot tab
—in output panel in studio

—in all of these if we want to know which activity got failed we can do one thing like keep the whole sequence in TRY Block of TRY CATCH Activity
—so if any exception occurs it will go to CATCH block where we can have a write line activity or log message activity with this statement
“ERROR OCCURRED AT : ”+ Exception.Source.Tostring +” due to : “ + Exception.Message.ToString

This will give us at which activity we got the error and why that error occurred

Hope this would help you
Cheers @Daun

1 Like

So, at the beginning of the Main, I should surround the whole Main with Try and Catch and “Write Line” with “Exception.Message.ToString” method?

So, without using “Exception.Message.ToString”, is there no way that I can see why an error occurred?

Thanks @Palaniyappan

1 Like

Fantastic
Well not so
We can beck even with debug mode so that the process will stop at which activity this error occurs
But the thing suggested is the best practice to get to know when we do execute the process in production environment
And it’s not only like keeping the whole main workflow in try block rather if we have many small allotted sequence called as a invoked workflow then inside those sequence we can use this TRY CATCH BLOCK

Cheers @Daun

I guess what I am asking is whether UiPath automatically shows on which activity because of “XYZ” reasons, there are errors, so I will be able to know specifically what to do to fix the error without being embarrassed.

If I can include only invoked workflow, how then will I be able to know which error on which activity failed outside of invoked workflow?

@Palaniyappan

Yah of course if we are running in studio itself we can check where the error occurred in the OUTPUT panel which will show which activity got Faulted
And if we are running from orchestrator we can check with the LOG file for each job execution

Cheers @Daun

Yeah. We know where the error occurred. But how about why? In an activity, because of this and this reason, this error occurred… Is that possible?

Thank you!

@Palaniyappan

1 Like

That can be obtained only from this buddy
“Exception.Message.ToString”

Cheers @Daun

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.