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

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

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -