The other bad thing about doing this style is that if `execute` throws an exception and then `tryToClose` also does, then the exception from `tryToClose` will win and that's what the caller will see.

BTW, this is why try-with-resources is so useful, because it automatically handles all these edge cases. Really, I'm not very sure it is good practice to put all the close logic inside a helper method, since you lose track of any exception that's been thrown.