What is the best approach for exception handling in uipath if you have hundred of activities and many workflows? Error handling?

What is the best approach for exception handling in UiPath if you have hundreds of activities, multiple workflows and sequences??? Error handling?? Should use global error handling??

Hi @iamhamzanasir

When you are dealing with large number of activities, it is always adviced to keep these points in mind:

  1. Break the workflow into small, organised xamls, so that you can pinpoint where the error might have occurred.
  2. Inside each xaml (workflow), try to handle the exception then & there by surrounding the modules within try-catch block.
  3. Use any framework (RE or LE) as they have default exception handling mechanisms.
  4. It is advised to use only 1 global exception handler for the entire project, and do use it carefully, as an exception anywhere in the process will trigger it directly.
  5. Proper usage of log messages for effective exception handling & debugging.

The following course might help you understand the concepts in depth:

Hope this helps,
Best Regards.



You have to use it as you need

  1. You can have only one global handler cannot have multiple…and bear in mind when you have global handler then anything that throws error even in a try catch will first go to global exception handler and then to the catch block.These are used to recover the process as and when there and should eb used with conditions like and steps on what to do when error similar happens in any part of code
  2. Try catch…to catch local errors are better handled…can increase the scope and decrease as needed
  3. Few might not need both a retry scope should do the job

Hope this helps