Exam UiADPv1 All QuestionsBrowse all questions from this 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?

    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
JimmyFoxxOption: A

A Test on studio

EricHsu

Me Too, Test from studio

milindkumarOption: A

A is the correct one

AndresPCOption: A

A is the correct one

6eebb19Option: B

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

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