@hypolite in this case the `finally` block does not need to alter the return value of the function so no, it doesn't need to have such a statement. We're you suggesting it would read better if the existing `return` statement would be moved there or something?
@greg0ire :doctrine: I was confused about what finally does, I've not used it in a while. And if I'm confused, then I probably won't be the only one. Is the return value expected to be true if there's an exception thrown? Intuitively I expect the finally block to return false.
@hypolite if there's an exception, there is no return value because it blows up before the function even gets a chance to return. A piece of code that would be equivalent IMO would be a try catch inside a catch that would attach one exception to the other (or rather, one chain of exceptions to the other) before rethrowing.
Hypolite Petovan
in reply to greg0ire • • •finallyblock?greg0ire
in reply to Hypolite Petovan • • •Hypolite Petovan
in reply to greg0ire • • •finallydoes, I've not used it in a while. And if I'm confused, then I probably won't be the only one. Is the return value expected to betrueif there's an exception thrown? Intuitively I expect thefinallyblock to returnfalse.greg0ire
in reply to Hypolite Petovan • • •Hypolite Petovan
in reply to greg0ire • • •