UiADPv1 Exam QuestionsBrowse all questions from this exam

UiADPv1 Exam - Question 81


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 Answer
Correct Answer: A

If an ApplicationException is thrown and the Catches section is designed to handle only InvalidOperationException, the ApplicationException will not be caught by the InvalidOperationException handler. This will result in an unhandled exception, leading to a runtime error. Consequently, the Finally block will not be executed as it is only run if no exceptions occur or if a handled exception occurs. Since the exception is unhandled, the Finally block does not get executed, and a runtime error occurs.

Discussion

4 comments
Sign in to comment
JimmyFoxxOption: A
Jan 21, 2024

A Test on studio

EricHsu
Apr 30, 2024

Me Too, Test from studio

AndresPCOption: A
Feb 13, 2024

A is the correct one

milindkumarOption: A
Feb 29, 2024

A is the correct one

6eebb19Option: B
Apr 11, 2024

Finally - The activity or set of activities to be performed after the Try and Catches blocks are executed. This section is executed only when no exceptions are thrown or when an error occurs and is caught in the Catches section

6eebb19
Apr 11, 2024

Nvm is A. This is an exception, not an error