Alex Armenteros wrote:From what I see in your code.
you never get to enter the second try/finally block as an exception is thrown inside the f¡rst "doSomething", so you'd never see the "nested finally"
No, the nested finally will be executed. That's the whole point of finally. It's executed whether an exception is thrown or not, and if one is, it's executed whether one is caught or not. A return, exception, break, or continue out of a try or catch always transfers control to finally if it's present. (And a return, exception, break, or continue out of finally is almost always a bad idea.)