Runtime error occur if correct exception not used for Application exception

Description

I have tried this in UiPath studio and learned one new thing today
After throw activity throws an exception, it will go to catch block. Here in this case, only InvalidOperationException is present, so runtime error occur and Finally block not Executed.
This image shows a try-catch block in a programming interface where an ApplicationException is being thrown, with a provision to catch an InvalidOperationException and log a message in the finally block. (Captioned by AI)

Link

Date

2024-10-02

Related UiPath products

Studio

@sallavudeen_ashwin,

In catch block add System.Exception and this will handle all the exception which are not specifically handled.

yes @ashokkarale and at the sametime, if we have system.exception and sytem.invalidOperation also. System.exception is the first prefer for system/application error thrown

For the Above one, Practical answer should be runtime error occurs and Finally block not executed.

Happy learning and Automation!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.