Courseiva

UiPath-ADAv1 Debugging and Exception Handling Practice Question

An automation developer is building a UiPath process that uses a Try Catch activity. Inside the Try block, a sequence of activities interacts with a desktop application. The developer wants to capture a screenshot of the screen only when an exception occurs, and also ensure that a specific cleanup activity runs regardless of whether an exception was thrown. Which configuration correctly achieves these requirements?

⚠ Common exam trap

The trap here is assuming that the Finally block runs only when an exception occurs, when in fact it always runs.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Place the screenshot activity in the Catch block and the cleanup activity in the Finally block.

The Catch block is specifically designed to handle exceptions and runs only when an exception is caught, so placing the screenshot there ensures it is taken only on error. The Finally block always executes after the Try and Catch sections, making it the correct place for cleanup activities that must run regardless of success or failure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Place the screenshot activity in the Try block and the cleanup activity in the Catch block.

    Why it's wrong here

    Placing the screenshot in the Try block means it would execute during normal operation, not only on error. The Catch block only runs when an exception is caught, so cleanup would not occur if no exception is thrown. This fails to meet the requirement that cleanup runs regardless of exceptions.

  • ✗

    Place both the screenshot and cleanup activities in the Finally block.

    Why it's wrong here

    The Finally block executes regardless of whether an exception occurred, so the screenshot would be taken even during successful runs, violating the requirement to capture only on error. Additionally, combining both activities there does not provide conditional execution for the screenshot. This approach is incorrect.

  • ✗

    Place the screenshot activity in the Finally block and the cleanup activity in the Try block.

    Why it's wrong here

    The Finally block always runs, so the screenshot would be taken even without an exception, which is not desired. Placing cleanup in the Try block means it would only execute if no exception occurs before that point, so it would not run if an exception is thrown earlier. This configuration fails both requirements.

  • ✓

    Place the screenshot activity in the Catch block and the cleanup activity in the Finally block.

    Why this is correct

    The Catch block executes only when an exception is thrown, so placing the screenshot activity there ensures it runs only on error. The Finally block always executes after the Try and any Catch blocks, regardless of whether an exception occurred, making it ideal for cleanup activities. This configuration meets both requirements precisely.

About these practice questions

Courseiva writes every UiPath-ADAv1 question from scratch — 285 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official UiPath exam blueprint

This UiPath-ADAv1 practice question is part of Courseiva's free UiPath certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the UiPath-ADAv1 exam.