Uipath Certified RPA Associate Uirpa · Free Practice Question Medium

Question 19

Scenario: You created multiple exception types in the Catch block and an exception has occurred which fits more than one type.

Which block will execute?

  • A

    The first match defined

  • B

    The block with most generic match

  • C

    The block with most specific match

  • D

    All matching blocks in the order they are defined

Reveal correct answer

Correct answer: C

Explanation

When multiple rules have been put into place to catch and manage errors, the block with the most specific match will be applied.

https://forum.uipath.com/t/how-to-use-multiple-business-rule-exception/244032/2


Since C# 6 we have Exception Filters that allow us to ‘filter’ our catch-blocks. If we want to handle multiple types of exceptions in the same way using Exception Filters, we could write this:

https://blog.pieeatingninjas.be/2016/09/26/how-to-catch-multiple-types-of-exceptions-in-one-catch-block/

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need