# Finally is not executed

**URL:** <https://forum.uipath.com/t/finally-is-not-executed/457156>\
**Category:** Activities\
**Tags:** question, system, activities\
**Created:** [July 17, 2022, 11:41am UTC](https://forum.uipath.com/t/finally-is-not-executed/457156 "2022-07-17T11:41:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shraddha\_joshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shraddha_joshi/32/176617_2.png) [@shraddha\_joshi](https://forum.uipath.com/u/shraddha_joshi)\
**Post date:** [July 17, 2022, 11:41am UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/1 "2022-07-17T11:41:41Z")

</div>

Hi All,

We have observed that when exception is caught in catch and thrown , finally is not executed .  
As per our knowledge , no matter what is the case , finally block should be executed always but its not happing right now.

I am using community edition 2022.4.3

Is this an known issue in UiPath try catch finally ?

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [July 17, 2022, 11:52am UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/3 "2022-07-17T11:52:46Z")

</div>

Hi,

It is more of a Windows Workflow Foundation specification than UiPath.  
Please see the following document in detail.

> **[Exceptions - .NET Framework](https://learn.microsoft.com/en-us/dotnet/framework/windows-workflow-foundation/exceptions)**
>
> Learn more about: Exceptions

Regards,

---

<div class="post-metadata">

**Author:** ![Rounak\_Kumar1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rounak_kumar1/32/267009_2.png) [@Rounak\_Kumar1](https://forum.uipath.com/u/Rounak_Kumar1)\
**Post date:** [July 17, 2022, 11:53am UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/4 "2022-07-17T11:53:23Z")

</div>

Hey,  
Have you used Rethrow Activity in Catch Block then it will not go in Finally block

Thanks

---

<div class="post-metadata">

**Author:** ![shraddha\_joshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shraddha_joshi/32/176617_2.png) [@shraddha\_joshi](https://forum.uipath.com/u/shraddha_joshi)\
**Post date:** [July 17, 2022, 12:45pm UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/5 "2022-07-17T12:45:36Z")

</div>

I have used throw

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [July 17, 2022, 1:34pm UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/6 "2022-07-17T13:34:55Z")

</div>

Hi,

As I mentioned in previous post, it’s specification of try-catch activity. In the document, it’s described as the following.

> The activities in the [Finally](https://docs.microsoft.com/en-us/dotnet/api/system.activities.statements.trycatch.finally) section are executed when either the [Try](https://docs.microsoft.com/en-us/dotnet/api/system.activities.statements.trycatch.try) section or the [Catches](https://docs.microsoft.com/en-us/dotnet/api/system.activities.statements.trycatch.catches) section successfully completes.

Unfortunately, as Try-Catch activity is made by not UiPath but Microsoft, there is no way but accept its specification at this time.

Regards,

---

<div class="post-metadata">

**Author:** ![shraddha\_joshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shraddha_joshi/32/176617_2.png) [@shraddha\_joshi](https://forum.uipath.com/u/shraddha_joshi)\
**Post date:** [July 17, 2022, 1:39pm UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/7 "2022-07-17T13:39:07Z")

</div>

Thanks for providing this information

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [July 20, 2022, 1:39pm UTC](https://forum.uipath.com/t/finally-is-not-executed/457156/8 "2022-07-20T13:39:16Z")

</div>

Closed on July 20, 2022, 1:39pm UTC

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