BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

UiPath Exam UiPath-ADPv1 Topic 1 Question 16 Discussion

Actual exam question for UiPath's UiPath-ADPv1 exam
Question #: 16
Topic #: 1
[All UiPath-ADPv1 Questions]

When encountering an ApplicationException, what occurs if the developer chooses InvalidOperationException as the exception handler within the Catches section of the Try Catch activity?

Show Suggested Answer Hide Answer
Suggested Answer: A

In a Try Catch activity within UiPath, when an exception is thrown that does not match any of the exception types specified in the Catches section, the exception is unhandled by the Catches section. If the thrown exception is an ApplicationException and the Catches section is only configured to handle an InvalidOperationException, then the ApplicationException is not caught because it is a different type of exception.

However, regardless of whether the exception is caught, the Finally block always executes. The Finally block is designed to run after the Try block and after any Catch blocks are checked for matches (regardless of whether a match is found or not).

Therefore, the correct answer is:

A) The Finally block is executed and the Catches section catches the exception.

In this context, 'the Catches section catches the exception' means that the Catches section is evaluated for a match. Since ApplicationException is not handled by the InvalidOperationException catch block, the exception is not actually caught, but the Finally block will still execute.


Contribute your Thoughts:

Ryan
5 months ago
Option C though, a runtime error occurs and the Finally block is not executed. That sounds more plausible.
upvoted 0 times
...
Marleen
5 months ago
Hmm, I think B could be misleading. An exception is already thrown.
upvoted 0 times
...
Audry
6 months ago
Option B mentions no exception is thrown and the Finally block executes.
upvoted 0 times
...
Latonia
6 months ago
Option A says the Finally block is executed and the Catches section catches the exception.
upvoted 0 times
...
Marleen
6 months ago
Yeah, me too. Let's see the options. What happens if you handle an ApplicationException with an InvalidOperationException?
upvoted 0 times
...
Ryan
7 months ago
I'm a little puzzled by this question about Exception Handling in the exam.
upvoted 0 times
...

Save Cancel