Lesson 12 – Debugging & Exception Handling

Lesson 12 – Debugging & Exception Handling

Debugging in simple terms is the process of identifying and removing errors from the project. Now, to debug errors, you need to go to the Execute tab. The Execute tab has 3 sections, Launch section, Debug section & the Logs section, as you can see in the below image:

Debugging is the process of identifying and removing errors from a given workflow. Coupled with logging and breakpoints, it becomes a powerful functionality that offers you information about your project and step-by-step highlighting, so that you can be sure it is error-free. Logging enables you to display details about what is happening in your workflow in  the Output panel. This in turn makes it easier for you to debug a workflow.Breakpoints enable you to pause the execution of a workflow so that you can check its state
at a given point.


Exception Handling mainly deals with handling errors with respect to various activities in UiPath. The Error Handling activity offers four options: Rethrow, Terminate Workflow, Throw, Try Catch.

Below are the key points for exception handing .

  • Rethrow : – it is  used when you want activities to occur before the exception is thrown.
  • Terminate :- workflow is used to terminate the workflow the moment the task encounters an error.
  • Throw :- This activity is used when you want to throw error before the execution of the step.
  • Try Catch :-  This activity is used when you want to test something and handle the exception accordingly. So, whatever you want to test you can put it under the try section, and then if any error occurs, then it can be handled using the catch section, based on your input to the catch section. Apart from the try-catch, we also have a Finally section which is used to mention those activities which have to be performed after the try and catch blocks are executed.

Below are Lesson 12 – Debugging & Exception Handling Quiz Answers

1). Where can you see the variables’ values during workflow execution?
Ans : – In the Locals pane

2). If you need to stop the workflow until a UI Element has disappeared from the screen, what activity should you use?
Ans : – Wait Element Vanish

3). The Finally block of a Try/Catch activity is executed when:
Ans : – Every time, regardless if an exception occurred or not.

4). Where can you find more details about the following error that appears when loading a workflow: “Activity could not be loaded because of  errors in the XAML”?
Ans : – In Output pane

5). What is the most effective way to handle the click on a UI Element that is not always available?
Ans : – By using an Element Exists activity and then a Click activity.

6). How many Catches can you have in a Try/Catch block?
Ans : – There is no limit on the number of catches.

7). What happens if you put a Breakpoint on a Click activity and start the workflow in Debug mode?
Ans : – The workflow will be paused until you click the Continue button.

8). When you have more than one exception type defined in the Catch block, which block is executed?
Ans : – All matching blocks in the order they are defined

9). What does the Locals panel display when you are working in Debug mode?
Ans : – The current values of your variables.

10). What activity can be used in a Citrix environment to check whether a UI element is displayed or not?
Ans : – Image Exists

for Reference : Uipath Tutorials 

Visit my other post : lesson-11-e-mail-automation

Lesson 11 – E-mail Automation


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.