Why use "ensure" during Ruby exception handling? -


this question has answer here:

using begin => rescue => else => ensure => end blocks, doesn't code after "end" run no matter what? couldn't put put in "ensure" after "end"?

ensure runs no matter what, if exceptions raised in rescue block.


Comments

Popular posts from this blog

c# - Store DBContext Log in other EF table -

Nuget pack csproj using nuspec -

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -