# Nested Try blocks not working as expected. Is this a bug?

**URL:** https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213
**Category:** Discussion
**Created:** [May 21, 2009, 11:31am UTC](https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213 "2009-05-21T11:31:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [May 21, 2009, 11:31am UTC](https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213/1 "2009-05-21T11:31:45Z")

</div>

Try blocks within a finally behave unexpectedly. Code after the Finally inter Try - End never gets executed. See example below. Running 6.3.0.1472. Any thoughts would be greatly appreciated.

Try

&nbsp;&nbsp;&nbsp;&nbsp; Action(s) - _ **failure happens somewhere in here!** _

Finally

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Action1

&nbsp;&nbsp;&nbsp;&nbsp; Try

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Action(s)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finally&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cleanup of Action1 - This needs to always execute, but I dread placing this in an outermost end block.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End - We jump from this end&nbsp;to the final end. Why? This should only end the most recent Try block.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Actions - _ **These never get executed** _

End

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [May 22, 2009, 1:54am UTC](https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213/2 "2009-05-22T01:54:40Z")

</div>

Hi Matt   
  
 Thanks for the detailed report, I was able to reproduce and fix the problem, I will post here when a build with the fix is available (later today).

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [May 22, 2009, 9:14am UTC](https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213/3 "2009-05-22T09:14:40Z")

</div>

Hi Matt   
  
 Here’s a build with the fix :   
  
 [https://www.finalbuilder.com/downloads/finalbuilder/630/FB630\_1510.exe](https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1510.exe)

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [May 22, 2009, 3:07am UTC](https://www.finalbuilder.com/forums/t/nested-try-blocks-not-working-as-expected-is-this-a-bug/1213/4 "2009-05-22T03:07:45Z")

</div>

Thanks Vincent!

I tested the patched version this morning and nested try/finally now works as exepected.

Thanks for the ultra-quick reply/fix!
